Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App keeps stopping on Android. #368

Closed
motogod opened this issue Oct 8, 2018 · 9 comments
Closed

App keeps stopping on Android. #368

motogod opened this issue Oct 8, 2018 · 9 comments

Comments

@motogod
Copy link

motogod commented Oct 8, 2018

My situdation is just the same as facebook/react-native#20242.

I'm facing the issue since yesterday evening, my project was working fine before.

Some people's issue comes from com.facebook.fresco
facebook/react-native#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"
  },
  1. react-native init testAd --version 0.55.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 ?

@sanket-lathiya
Copy link

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

@motogod
Copy link
Author

motogod commented Oct 8, 2018

@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 :(

@MahmoudElmoghazy
Copy link

@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

@gregogalante
Copy link

@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!

@MahmoudElmoghazy
Copy link

You welcome man :)

@motogod
Copy link
Author

motogod commented Oct 8, 2018

@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.

@motogod motogod closed this as completed Oct 8, 2018
keller added a commit to keller/react-native-admob that referenced this issue Nov 2, 2018
keller added a commit to keller/react-native-admob that referenced this issue Nov 2, 2018
@mxvsh
Copy link

mxvsh commented Feb 21, 2019

i am getting this error.

Program type already present: com.sbugert.rnadmob.RNAdMobBannerViewManager

@magic990619
Copy link

@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.

@Abdullah1428
Copy link

@MahmoudElmoghazy
Thanks, man.
It worked for me❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants