Android Firebase NoClassDefFoundError: com.google.firebase.FirebaseOptions after updating to the new firebase -
this question has answer here:
i have updated application new firebase using , when compile project on device using android kitkat following exception, function on android lollipop
here logcat when run on android kitkat:
androidruntime: fatal exception: main process: com.lemon.kenhnhacvn, pid: 23133 java.lang.noclassdeffounderror: com.google.firebase.firebaseoptions @ com.google.firebase.firebaseapp.zzek(unknown source) @ com.google.firebase.provider.firebaseinitprovider.oncreate(unknown source) @ android.content.contentprovider.attachinfo(contentprovider.java:1591) @ android.content.contentprovider.attachinfo(contentprovider.java:1562) @ com.google.firebase.provider.firebaseinitprovider.attachinfo(unknown source) @ android.app.activitythread.installprovider(activitythread.java:4818) @ android.app.activitythread.installcontentproviders(activitythread.java:4413) @ android.app.activitythread.handlebindapplication(activitythread.java:4353) @ android.app.activitythread.access$1500(activitythread.java:135) @ android.app.activitythread$h.handlemessage(activitythread.java:1256) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:136) @ android.app.activitythread.main(activitythread.java:5045) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:515) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:779) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:595) @ dalvik.system.nativestart.main(native method)
my build.gradle :
compile filetree(include: ['*.jar'], dir: 'libs') testcompile 'junit:junit:4.12' compile project(':searchlibrary') compile 'com.android.support:multidex:1.0.1' compile 'com.android.support:appcompat-v7:24.1.1' compile 'com.android.support:design:24.1.1' compile 'com.android.support:recyclerview-v7:24.1.1' compile 'com.android.support:cardview-v7:24.1.1' compile 'com.android.support:palette-v7:24.1.1' compile 'com.google.code.gson:gson:2.6.2' compile 'de.hdodenhof:circleimageview:2.0.0' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.jakewharton:butterknife:8.0.1' apt 'com.jakewharton:butterknife-compiler:8.0.1' compile 'com.facebook.android:facebook-android-sdk:4.10.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-messaging:9.4.0'
can me solve problem?
in case
remove dependency build.gradle
file
compile 'com.google.android.gms:play-services:9.4.0'
and add separate 1 this
compile 'com.google.android.gms:play-services-maps:9.4.0' compile 'com.google.android.gms:play-services-location:9.4.0'
this should solve problem.
Comments
Post a Comment