Home > other >  Gradle build failed with Expo eas build beacuse of react-native-google-mobile-ads
Gradle build failed with Expo eas build beacuse of react-native-google-mobile-ads

Time:09-09

Since expo-admob is deprecated I wanted to move to react-native-google-mobile-ads, but I can't even build my project. I used to do it with 'expo build:android', but since we need to build native code I tried eas. With that whenever I try to build my managed workflow project with it get the following error:

[stderr] /home/expo/workingdir/build/android/app/src/main/AndroidManifest.xml:29:85-105 Error:

[stderr]    Attribute meta-data#com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT@value value=(true) from AndroidManifest.xml:29:85-105

[stderr]    is also present at [:react-native-google-mobile-ads] AndroidManifest.xml:19:13-34 value=(false).

[stderr]    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:29:5-107 to override.

app.json

{
  "expo": {
      ...
  },
  "react-native-google-mobile-ads": {
    "android_app_id": "ca-app-pub-************~**********",
    "ios_app_id": "ca-app-pub-***********/**********"
  }
}

Not sure what to do :/

CodePudding user response:

change com.google.android.gms.ads.DELAY_APP_MEASUREMENT_INIT value from true to false from androidmanifest file

  • Related