GuidesDiscussions
Log In
Guides

AdMob support (Optional)

In case the host application is already having Ad-Mob SDK and related Meta data in manifest, we are likely to see the error which looks similar to one as shown below:

Merging Errors: Error: Attribute meta-data#com.google.android.gms.ads.APPLICATION_ID
@value value=(ca-app-pub-8647026263512754~4219912420) from AndroidManifest.xml:33:13-67 
is also present at AndroidManifest.xml:240:13-67 value=(ca-app-pub-8647026263512754~
4219312429). Suggestion: add 'tools:replace="android:value"' to <meta-data> element 
at AndroidManifest.xml:31:9-34:15 to override. IUAmazonia.iutestapp main manifest 
(this file), line 32

On receiving this error, please add the following attribute into the manifest tag on the top of the file

xmlns:tools="http://schemas.android.com/tools"

Final manifest tag will look similar to one below:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
          xmlns:tools="http://schemas.android.com/tools">

Add the following tag to Ad-Mob meta-data tag

tools:replace="android:name, android:value"

Sample of final <meta-data> tag would be look similar to the code as below:

<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="ca-app-pub-8647026263512754~4219912420"
    tools:replace="android:name, android:value" />