Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on compile #2

Open
frodfigu opened this issue Nov 8, 2020 · 4 comments
Open

Error on compile #2

frodfigu opened this issue Nov 8, 2020 · 4 comments

Comments

@frodfigu
Copy link

frodfigu commented Nov 8, 2020

[ERROR] [GRADLE] Attribute meta-data#onesignal_app_id@value value=(XXXXXXXXXXXXXXXXXXX) from AndroidManifest.xml:12:60-112
[ERROR] [GRADLE] is also present at [com.onesignal:OneSignal:3.15.4] AndroidManifest.xml:51:13-48 value=(${onesignal_app_id}).
[ERROR] [GRADLE] Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:12:17-114 to override.

Any Solution?

@frodfigu
Copy link
Author

frodfigu commented Nov 8, 2020

When I add this replace sentence... shows me another error:

[ERROR] [GRADLE] /Users/franrodas/Documents/Appcelerator_Studio_Workspace/palapala/build/android/app/src/debug/AndroidManifest.xml Error:
[ERROR] [GRADLE] Attribute meta-data#onesignal_google_project_number@value at AndroidManifest.xml requires a placeholder substitution but no value for <onesignal_google_project_number> is provided.

@frodfigu
Copy link
Author

frodfigu commented Nov 8, 2020

After all non-documented issues...
My onesignal dashboard shows me: Invalid Google Project Number

¿??¿¿?¿?¿???¿?¿?¿

¿Can you help me? Thank you!

@deckameron
Copy link
Owner

Hi @frodfigu

I have had this same issue once and I solved it by adding the following to the tag on the android manifest of my Tiapp.xml:

<meta-data android:name="onesignal_app_id" android:value="YOUR_ONESIGNAL_APP_ID" tools:replace="android:value"/>
<meta-data android:name="onesignal_google_project_number" android:value="str:YOUR_GOOGLE_PROJECT_NUMBER" tools:replace="android:value"/>

So i was something like this:

<android xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
    <abi>armeabi-v7a,arm64-v8a</abi>
    <manifest android:installLocation="auto" android:versionCode="1" android:versionName="1.0.0"
        <application android:allowBackup="true" android:hardwareAccelerated="true" android:largeHeap="true">
            <!-- other stuff-->
            <meta-data android:name="onesignal_app_id" android:value="YOUR_ONESIGNAL_APP_ID" tools:replace="android:value"/>
            <meta-data android:name="onesignal_google_project_number" android:value="str:YOUR_GOOGLE_PROJECT_NUMBER" tools:replace="android:value"/>
            <!-- other stuff-->
        </application>
    </manifest>
</android>

@appinlet
Copy link

appinlet commented Oct 5, 2021

To fix:

[ERROR] [GRADLE] Execution failed for task ':app:processDebugMainManifest'.
[ERROR] [GRADLE] > com.android.manifmerger.ManifestMerger2$MergeFailureException: org.xml.sax.SAXParseException; lineNumber: 16; columnNumber: 127; The value of the attribute "prefix="xmlns",localpart="tools",rawname="xmlns:tools"" is invalid. Prefixed namespace bindings may not be empty.

I had to add:

<meta-data android:name="onesignal_app_id" android:value="YOUR_ONESIGNAL_APP_ID" xmlns:tools="http://schemas.android.com/tools" tools:replace="android:value"/>
<meta-data android:name="onesignal_google_project_number" android:value="str:YOUR_GOOGLE_PROJECT_NUMBER" xmlns:tools="http://schemas.android.com/tools" tools:replace="android:value"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants