react-native-admob icon indicating copy to clipboard operation
react-native-admob copied to clipboard

App crashing after instalation

Open guigalleta opened this issue 4 years ago • 8 comments

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?

guigalleta avatar Jan 14 '20 15:01 guigalleta

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 avatar Jan 17 '20 00:01 Kendysond

@Kendysond even after following the instructions from this link, the app still crashes upon launch. i honestly don't know what to do lol

guigalleta avatar Jan 17 '20 15:01 guigalleta

@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

geiz avatar Mar 05 '20 21:03 geiz

having same problem. even followed this link

eramudeep avatar Apr 05 '20 08:04 eramudeep

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 avatar Jun 26 '20 19:06 hkniyi

@hkniyi Thank you for the solution, it's useful for me.

aksaber avatar Oct 22 '20 08:10 aksaber

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!

NinjaAniket avatar Jul 04 '21 15:07 NinjaAniket

For me it still doesnt work. Already have the ~ instead of / and the app closes instantly after startup.

Kubaguette avatar Jul 30 '21 09:07 Kubaguette