I'm using ReactNative Expo for developing android/iOS app also added AdMOB via expo ADMOB sdk . Issue is when i generate apk using expo build:android -t apk . It's returning following error because of googleMobileAdsAppId field in app.json file. I'm using admob "sdkVersion": "34.0.0"
Error: Problems validating fields in app.json. See https://docs.expo.io/versions/v34.0.0/workflow/configuration/
• Field: android.config - should NOT have additional property 'googleMobileAdsAppId'.
Couldn't publish because errors were found. (See logs above.) Please fix the errors and try again.
Here is my app.json file:
{
"expo": {
"name": "AppName",
"slug": "AppSlug",
"privacy": "public",
"sdkVersion": "34.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.x.yyyyy",
"config": {
"googleMobileAdsAppId": "ca-app-pub-xxxxxx"
}
}
}
}