react-native-admob
react-native-admob copied to clipboard
App crashing after instalation
I've installed the package with yarn add and updated my androidManifext.xml as instructed in google's developers website. The project has no problems compiling it, so no error messages. However, my debug app crashes the second i launch it.
My app has a loading page that navigates to home when it get response from the API. This loading screen has nothing in it, so it's not the loading screen causing the crash
if i remove the package with yarn remove my app goes back to normal.
how can i fix this?
Hi @guigalleta , I haven't tried this on Android yet, but my app was also crashing on iOS after I installed the package.
However, setting my Admob ID as instructed here https://developers.google.com/admob/ios/quick-start#update_your_infoplist fixed it for me.
@Kendysond even after following the instructions from this link, the app still crashes upon launch. i honestly don't know what to do lol
@Kendysond's suggestion worked for me. Putting the ID into "info.plist" after installing V2.
Also make sure you have V2 and not V1 of the package. I made this silly mistake earlier. V1 is installed by: npm i --save react-native-admob V2 is installed by : npm i --save react-native-admob@next
having same problem. even followed this link
IN ...\android\app\src\main\AndroidManifest.xml
CHANGE
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544/**********"/>
TO
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~**********"/>
Change: / to ~
@hkniyi Thank you for the solution, it's useful for me.
IN ...\android\app\src\main\AndroidManifest.xml
CHANGE
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3940256099942544/**********"/>
TO
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-3940256099942544~**********"/>
Change: / to ~
I was searching for days to solve this. That worked thanks man!
For me it still doesnt work. Already have the ~ instead of / and the app closes instantly after startup.