androidfirebasereact-nativeadmobfirebase-admob

React-native error : is also present at [:@react-native-firebase_admob] AndroidManifest.xml:18:13-29


after installing react-native-firebase_admob i changed the manifest file with the value :

 <application>
   ******
   <meta-data  android:name="com.google.android.gms.ads.APPLICATION_ID"
                android:value="ca-app-pub-4247389872422093~1957443376"/>

and then I get this error :

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : 
           Attribute meta-data#com.google.android.gms.ads.APPLICATION_ID@value
           value=(ca-app-pub-4247389872422023~1957443376)
           from AndroidManifest.xml:30:78-132

is also present at
           [:@react-native-firebase_admob] AndroidManifest.xml:18:13-29
           value=().

Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:30:9-134
to override.

Solution

  • Just follow the suggestion.

    
    <application>
       ******
    <meta-data  android:name="com.google.android.gms.ads.APPLICATION_ID"
                android:value="ca-app-pub-4247389872422093~1957443376"
                tools:replace="android:value"/>