I am trying to implement Fire Base
in my application. Its working fine in Lollipop
and above.
While running pre lollipop am getting an error:
java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions
at com.google.firebase.FirebaseApp.zzbu(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:4825)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4420)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4360)
at android.app.ActivityThread.access$1500(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5052)
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:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
In my Gradle:
defaultConfig {
applicationId "com.manoramaonline.mmc.year2017"
minSdkVersion 14
targetSdkVersion 23
multiDexEnabled true
}
dependencies {
compile project(':library')
compile project(':wheel')
compile project(':socialauthandroid')
compile project(':ambilWarna')
compile files('libs/acra-4.5.0.jar')
compile files('libs/FlurryAgent.jar')
compile files('libs/poi-3.9.jar')
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:support-v4:23.0.0'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services-analytics:9.0.0'
compile files('libs/InMobi-5.3.1.jar')
compile 'com.android.support:cardview-v7:23.3.+'
compile 'com.android.support:recyclerview-v7:23.3.+'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.googlecode.json-simple:json-simple:1.1'
compile 'com.google.firebase:firebase-core:9.0.0'
compile 'com.google.firebase:firebase-messaging:9.0.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:multidex:1.0.1'
}
I trying by add MultiDex
as dependency and enable it in default config. But not fix the solution.
I think issue is 64k reference limit
But don't know how to fix it.