I’m experiencing an issue where my Expo React Native app is crashing immediately on start after installing the react-native-google-mobile-ads
package.
UPDATED:
I’ve taken the following steps so far…
- Install using
npx expo install react-native-google-mobile-ads
- Update app.json per the documentation (obscured my IDs):
"plugins": [
"expo-router",
"expo-localization",
"expo-apple-authentication",
[
"react-native-google-mobile-ads",
{
"androidAppId": "ca-app-pub-<id obscured>",
"iosAppId": "ca-app-pub-<id obscured>"
}
]
],
- Create a development build
- Install development build on device
Curious if I’m still doing something incorrectly here. Any help is appreciated!
2
Answers
app.config.js
notapp.config.json
app.config.js
andapp.json
. Both files can exist but ultimately their purpose is to return a JS object describing the configuration of your Expo app. Personally I useapp.config.js
because it allows me to dynamically calculate some of the Expo properties based on the build environment.app.json
are for the React-Native configuration (that involves other steps). But since you are using Expo I would encourage you to look at the Expo configuration steps:I have the same issues. I follow the docs for expo and I get: