问题
Before, my app work fine. Today I rebuild and it show error java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
I search and find solution is add my admob id in AndroidManifest.xml
and I add it and rebuild, but it show same error.
How I can fix it?
回答1:
Add this line in your project AndroidManifest.xml, inside 'application' tag
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="[appid here]"/>
来源:https://stackoverflow.com/questions/53007914/react-native-admob-unable-to-get-provider-com-google-android-gms-ads-mobileadsin