Closed robertnicjoo closed 4 years ago
Anyone?
It is in platforms/android/app/src/main/AndroidManifest.xml
This line <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-XXXXXXX~XXXXXXX" />
@tominou Ok, so I've changed value in file you mentioned also I've found it in package.json
and changed it there as well but when I tried to build release version I got this error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processReleaseManifest'.
> Manifest merger failed with multiple errors, see logs
* Try:
> Task :app:processReleaseManifest FAILED
So I've opened again AndroidManifest.xml
file and i saw this:
//my edited line
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxx~xxxxxxxx" />
//added line after build command with OLD VALUE
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxx~xxxxxxxxxxxx" />
any idea where this old value comes from? it seems it's stored somewhere else and it's higher priority than my edited line so it keeps adding to AndroidManifest.xml
file.
Thanks.
Check in platforms/android/app/src/
. You should have a main
folder, and if you have some others, check inside in they contain a AndroidManifest.xml
file. If so, edit it to use the new APP_ID.
@tominou I checked every single file there nothing refer to my old app_id
, except I found androind.json
and fetch.json
there I changed the value and run the command again.
Same result happen (old error and added old value) so my best guess is i can fix it by reinstall the plugin.
How do I remove this plugin in order to install it again?
cordova plugin rm --save cordova plugin add cordova-plugin-admob-free
something isn't right here, I tried to remove plugin by command it says Error: Variable(s) missing: ADMOB_APP_ID
so i removed all files and folders by myself also removed dependencies from package.json
etc. and reinstall it again. Yet it includes old value and new one both!!
Strange that it asks the variable when we want to remove it.
Try this:
cordova plugin rm cordova-plugin-admob-free --save --variable ADMOB_APP_ID="blabla"
Then reinstall it.
Let me know if it finally works ^^
ok will try this but the problem is that <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
is duplicated that's why my app can't be build and i don't get it why this old value keeps adding to my manifest file!
Okay so try this command from the root of your project (if you are on linux):
grep -rnw '.' -e 'com.google.android.gms.ads.APPLICATION_ID'
Then change the APP_ID manually in all those files.
OK I solved my issue this way:
this does clean whatever cache was to add my old value.
hope it help others.
Hi, I've installed this plugin on Ionic 4 with my old app_id and then I got issue with admob that says I had duplicated account etc.
Anyway I've made new email and new admob account completely now I think I need to update my admob id which I added by installation code
Question
Where can I find my old
YOUR_ANDROID_ADMOB_APP_ID_AS_FOUND_IN_ADMOB
in order to update it to my new account?thanks.