compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-crash:9.4.0'
App working fine in 6.0.1 but app crashing in 4.4.4
While open the app it crashing
java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions
at com.google.firebase.FirebaseApp.zzek(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:4855)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4450)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4390)
at android.app.ActivityThread.access$1500(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1270)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5086)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
It should not crash the app
Google play store link:
https://play.google.com/store/apps/details?id=com.app.bfonics.smartcity&hl=en
@mahesh825mahi would you mind showing your whole build.gradle file? Also what is the version of Google Play Services running on each device? You can find this out by going to Settings > Apps > Google Play Services
Did you find any solution?
@ramirosneto are you experiencing this problem as well? If so could you provide the information asked for by the issue template? I can't tell enough from @mahesh825mahi's original response to know what's going on.
@samtstern I am facing the same issue. The emulator I am using have google play services "3.6.25". The application is working fine in Lolipop and Marshmallow. Please look at the libraries I am using as well.
compile 'com.google.android.gms:play-services-fitness:9.0.1'
compile 'com.google.android.gms:play-services:
compile 'com.google.android.gms:play-services-identity:9.0.1'
compile 'com.google.android.gms:play-services-ads:9.0.1'
compile 'com.google.android.gms:play-services-auth:9.0.1'
compile 'com.google.android.gms:play-services-gcm:9.0.1'
Guide me to remove the error.
@ilpinnovations "3.6.25" is a very old version of Google Play Services! You will need version 9.x or higher in order for those dependencies to work.
Also this line compile 'com.google.android.gms:play-services: is likely to cause problems as it includes all of the Google Play Services APIs. You'll want to remove that.
I am going to close this issue due to old age and lack of updates. Please add a comment if you have any more information and would like us to keep investigating.
This is still happening and it all seems to happen on Android 4.4.4: https://github.com/myflashlab/Firebase-ANE/issues/116
Fail Devices:
Motorola XT1003 (falcon_umts) - Android 4.4
Google Nexus 5 (hammerhead) - Android 4.4
Samsing Galaxy Note 3 (hlte) - Android 4.4
HTC HTC_M8x (htc_m8) - Android 4.4
Motorola Moto G (titan_umts) - Android 4.4
Motorola XT1096 (victara) - Android 4.4
Exeption:
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/air.com.RainbowSquad-1.apk"],nativeLibraryDirectories=[/data/app-lib/air.com.RainbowSquad-1, /vendor/lib, /system/lib]]
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/air.com.RainbowSquad-1.apk"],nativeLibraryDirectories=[/data/app-lib/air.com.RainbowSquad-1, /vendor/lib, /system/lib]]
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/air.com.RainbowSquad-1.apk"],nativeLibraryDirectories=[/data/app-lib/air.com.RainbowSquad-1, /vendor/lib, /system/lib]]
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/air.com.RainbowSquad-1.apk"],nativeLibraryDirectories=[/data/app-lib/air.com.RainbowSquad-1, /vendor/lib, /system/lib, /vendor/lib]]
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/air.com.RainbowSquad-1.apk"],nativeLibraryDirectories=[/data/app-lib/air.com.RainbowSquad-1, /vendor/lib, /system/lib]]
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/air.com.RainbowSquad-1.apk"],nativeLibraryDirectories=[/data/app-lib/air.com.RainbowSquad-1, /vendor/lib, /system/lib]]
Anyone found the solution? I am facing same issue.
Same here, I am also getting this error in 4.4 devices.
I have the same issue
I have fixed this by adding the following on my manifest:
It looks like MultiDexApplication is needed when using firebase for Android older than 5.
I I have the same issue. It works on 6.0.1 android and above, but I have an error on 5.0.2 android device:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbp; at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5003)
at ......
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbp" on path: DexPathList[[zip file "/data/app/com.mypackagename-2/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]] at
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)聽
at android.app.ActivityThread.installProvider(ActivityThread.java:5003)聽
at ......
On device with android 5.0.2 I have Google Play services version 11.5.09(246-164803921).
Also I use multidex library: com.android.support:multidex:1.0.1
I have the similar issue with above android 5.0.2: -
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5003)
at ......On device with android 5.0.2 I have Google Play services version 11.5.09(246-164803921).
Anyone found a solution? I'm getting the same issue with android 4.2.2
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.google.android.gms.common.internal.zzbq
at com.google.firebase.perf.provider.FirebasePerfProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5097)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4680)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4613)
at android.app.ActivityThread.access$1300(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5371)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Same error for me on kitkat
Didn't find class "com.google.firebase.perf.provider.FirebasePerfProvider" on path: DexPathList[[zip file
just leaving a comment that issue is still pursuing. Multidex enabled, followed documentation, google play updated and still crashing on kit-kat version or older.
here is solution for kitkat
1: Go to the gradle enable multiDexEnabled and add multidex library in the dependencies.
android {
...
defaultConfig {
multiDexEnabled true
...
}
}
dependencies {
// add dependency
compile 'com.android.support:multidex:1.0.1'
}
2: Go to the Manifest file and write android:name=".MyApplication" (Class name(MyApplication) is optional you can write whatever you want ).
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
.
.
.
.
.
</application>
3: As you wrote android:name=".MyApplication" Inside Application at Manifest file. it will give you an error because you didn't create MyApplication class. Create MyApplication Class extend it by "application" class or Simply click on.MyApplication, a small red balloon appear on the left side of a syntax click on it, you will see (create MyApplication class) in the menu, click on it and Include below Method Inside that class.
public class MyApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
mudi256's solution works! great!
@evgentset @atrang89 have you manage to solve this? I have multidex enabled, google libraries matching version, removed play-services generic dependency but still doesn't works
Thanks mudi256. It works.great!
`public class MyApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
} `
If I use this and not extend CustomFontAppCompatActivity I cannot use onCreate, onDestroy and I need it. What I do?
It doesn't work for me too, it seems firebase support doesn't care about it. We are observing high level of crashes on our app and it is affecting our rating on PlayStore
Most helpful comment
here is solution for kitkat
1: Go to the gradle enable multiDexEnabled and add multidex library in the dependencies.
android {
...
defaultConfig {
multiDexEnabled true
...
}
}
dependencies {
// add dependency
compile 'com.android.support:multidex:1.0.1'
}
2: Go to the Manifest file and write android:name=".MyApplication" (Class name(MyApplication) is optional you can write whatever you want ).
3: As you wrote android:name=".MyApplication" Inside Application at Manifest file. it will give you an error because you didn't create MyApplication class. Create MyApplication Class extend it by "application" class or Simply click on.MyApplication, a small red balloon appear on the left side of a syntax click on it, you will see (create MyApplication class) in the menu, click on it and Include below Method Inside that class.