My situdation is just the same as https://github.com/facebook/react-native/issues/20242.
I'm facing the issue since yesterday evening, my project was working fine before.
Some people's issue comes from com.facebook.fresco
https://github.com/facebook/react-native/issues/20252
So I try to comment some library that I find out the problem comes from react-native-admob, because app can boots up when comment react-native-admob on android folder.
Here is my dependencies, I even try react-native-admob: 1.3.2 still can't fix the issue.
"dependencies": {
"react": "16.3.1",
"react-native": "~0.55.2",
"react-native-admob": "^2.0.0-beta.5",
}
I try to create a simple project to test it, the issue still there.
Here is my repro:
https://github.com/motogod/testAd
My step:
dependencies:
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.2",
"react-native-admob": "^1.3.2"
},
2.follow the step from official document https://github.com/sbugert/react-native-admob/tree/1.x
3.add maven { url "https://maven.google.com" } on build.gradle for google service 12
4.build project will show onRewardedVideoCompleted error , so add the code on the root
/node_modules/react-native-admob/android/src/main/java/com/sbugert/rnadmob/RNAdMobRewardedVideoAdModule.java
@Override
public void onRewardedVideoCompleted() {
sendEvent("rewardedVideoAdVideoCompleted", null);
}
5.react-native run-android and then will show out App keeps stopping on android simulator.
Any one has the same issue ?
After some searching, i understand that Google at October 2nd, 2018 updates some libraries that caused this error i changed android/build.gradle file :
compile 'com.google.android.gms:play-services-ads:+'
to
compile 'com.google.android.gms:play-services-ads:15.0.0'
and problem will get SOLVED
@sanket-lathiya thanks for reply, but I have try 14 or 15 or 16
dependencies {
...
implementation project(':react-native-admob')
implementation "com.google.android.gms:play-services-ads:15.0.0"
...
}
re-install app and run it.
Which version do you use ? My project react-native-admob is
"react-native-admob": "^2.0.0-beta.5",
It still shows App has stopping :(
@motogod appfolder/nodes_modules/react-native-admob/android/build.gradle
update compile 'com.google.android.gms:play-services-ads:+' to
compile 'com.google.android.gms:play-services-ads:15.0.0'
and it will work with u
@mahmo
@motogod appfolder/nodes_modules/react-native-admob/android/build.gradle
update compile 'com.google.android.gms:play-services-ads:+' to
compile 'com.google.android.gms:play-services-ads:15.0.0'
and it will work with u
I think I fall in love with you :D
It works for me!
You welcome man :)
@MahmoudElmoghazy
I think I fall in love with you too ! :D
It works for me!
I spent a day try to figure out the issue !
It is the solution. Close it.
i am getting this error.
Program type already present: com.sbugert.rnadmob.RNAdMobBannerViewManager
@motogod appfolder/nodes_modules/react-native-admob/android/build.gradle
update compile 'com.google.android.gms:play-services-ads:+' to
compile 'com.google.android.gms:play-services-ads:15.0.0'
and it will work with u
Thanks.
It works for me.
@MahmoudElmoghazy
Thanks, man.
It worked for me鉂わ笍
Most helpful comment
@motogod appfolder/nodes_modules/react-native-admob/android/build.gradle
update compile 'com.google.android.gms:play-services-ads:+' to
compile 'com.google.android.gms:play-services-ads:15.0.0'
and it will work with u