fullstackreact/react-native-firestack

Android crashes with : java.lang.NoSuchMethodError: No static method

rammuk opened this issue · 5 comments

Hi

I am trying to add react-native-firestack to my android project, I have created a fresh react native project ( which works ), after adding firestack ( followed the instructions ) when the app launch it crashes.

I am getting the following error:
java.lang.NoSuchMethodError: No static method zzdD(Ljava/lang/String;)Z in class Lcom/google/android/gms/common/util/zzv; or its super classes (declaration of 'com.google.android.gms.common.util.zzv' appears in /data/data/com.fireexample/files/instant-run/dex/slice-com.google.android.gms-play-services-basement-10.2.0_d87f0ff21f77ef6eda4f8e66e7068a463ed891b6-classes.dex) at com.google.firebase.FirebaseOptions.(Unknown Source)
at com.google.firebase.FirebaseOptions.fromResource(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1748)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1723)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Any suggestions?

Thanks

app/build.gradle add this work for me

dependencies {
...
compile ("com.google.android.gms:play-services-base:10.0.1") {
force = true;
}
compile ("com.google.android.gms:play-services-maps:10.0.1") {
force = true;
}
compile ("com.google.android.gms:play-services-gcm:10.0.1") {
force = true;
}
compile ('com.google.firebase:firebase-core:10.0.1') {
force = true;
}
compile ('com.google.firebase:firebase-messaging:10.0.1') {
force = true;
}
}

@ohmdob Thanks, It worked

@ohmdob thanks a lot ,worked for me as well

MCFR commented

@ohmdob thank you so much !

@ohmdob Thanks, It worked

app/build.gradle add this work for me

dependencies {
...
compile ("com.google.android.gms:play-services-base:10.0.1") {
force = true;
}
compile ("com.google.android.gms:play-services-maps:10.0.1") {
force = true;
}
compile ("com.google.android.gms:play-services-gcm:10.0.1") {
force = true;
}
compile ('com.google.firebase:firebase-core:10.0.1') {
force = true;
}
compile ('com.google.firebase:firebase-messaging:10.0.1') {
force = true;
}
}

app/build.gradle add this work for me

dependencies {
...
compile ("com.google.android.gms:play-services-base:10.0.1") {
force = true;
}
compile ("com.google.android.gms:play-services-maps:10.0.1") {
force = true;
}
compile ("com.google.android.gms:play-services-gcm:10.0.1") {
force = true;
}
compile ('com.google.firebase:firebase-core:10.0.1') {
force = true;
}
compile ('com.google.firebase:firebase-messaging:10.0.1') {
force = true;
}
}

Thanks! working great