React-native-device-info: Crash when launch app

Created on 7 Dec 2016  路  4Comments  路  Source: react-native-device-info/react-native-device-info

FATAL EXCEPTION: main Process: vn.sonice.SoniceApp.Sonice, PID: 28614 java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzab; or its super classes (declaration of 'com.google.android.gms.common.internal.zzab' appears in /data/app/vn.sonice.SoniceApp.Sonice-1/base.apk) at com.google.firebase.provider.FirebaseInitProvider.zza(Unknown Source) at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) at android.app.ActivityThread.installProvider(ActivityThread.java:4964) at android.app.ActivityThread.installContentProviders(ActivityThread.java:4559) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4499) at android.app.ActivityThread.access$1500(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

Here is the log crash when I launch app after link device info. Could you please to show me solution. Thanks

android bug

Most helpful comment

I had the same problem, check if any other RN plugin using com.google.android.gms:play-services. In my case I update react-native-firestack and there is now compile 'com.google.android.gms:play-services-base:9.8.0' in build.gradle file, so I change version in react-native-device-info to compile 'com.google.android.gms:play-services-gcm:9.8.0'.

Hope that will help you :)

All 4 comments

+1

I had the same problem, check if any other RN plugin using com.google.android.gms:play-services. In my case I update react-native-firestack and there is now compile 'com.google.android.gms:play-services-base:9.8.0' in build.gradle file, so I change version in react-native-device-info to compile 'com.google.android.gms:play-services-gcm:9.8.0'.

Hope that will help you :)

Do this steps:

Go to your project -> node_modules -> react-native-device-info -> android
Open build.gradle file
change this line
compile 'com.google.android.gms:play-services-gcm:+'
to
compile 'com.google.android.gms:play-services-gcm:10.2.4'
In the future if you add more package with com.google.android lines in its build.gradle files change the version to whatever version is used by react-native-maps in your project.

You can see the version of react-native-maps in node_modules/react-native-maps/lib/android/build.gradle

Documented how to disable com.google.android.gms in the troubleshooting section.
Will probably be dropped with next BC breaking release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ken-Lim picture Ken-Lim  路  5Comments

BBBOND picture BBBOND  路  4Comments

HAPENLY picture HAPENLY  路  5Comments

andreystarkov picture andreystarkov  路  5Comments

jmunozDevsu picture jmunozDevsu  路  4Comments