0

My project run normally in Android Studio version 2.1.2.In my project used Google map when I update AS to version 2.2 project not run (I do not use fire base but in log this error shown) this is error log:

  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:4818)
                                                                                at android.app.ActivityThread.installContentProviders(ActivityThread.java:4413)
                                                                                at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4353)
                                                                                at android.app.ActivityThread.access$1500(ActivityThread.java:135)
                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                at android.os.Looper.loop(Looper.java:136)
                                                                                at android.app.ActivityThread.main(ActivityThread.java:5045)
                                                                                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:779)
                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                                                                                at dalvik.system.NativeStart.main(Native Method)
sadegh sarvi
  • 164
  • 4
  • 15

1 Answers1

1

I was stuck with the same error for 2-3 days after i updated my Android Studio. There are many similar error questions on stack overflow. But nothing worked.

To solve it i created a new project in android studio. Copied all my code and dependencies to the new project and it worked for me.

And follow this link stackoverflow.com/a/37364044/6812027 and try to implement methods given.

Vishal Puri
  • 823
  • 8
  • 15
  • Thank but before I try it but the error replay in new project :-( – sadegh sarvi Sep 20 '16 at 18:04
  • Ok. Check if you have all your libraries imported correctly in your new project. And follow this link http://stackoverflow.com/a/37364044/6812027 and try to implement methods given. Hope it helps – Vishal Puri Sep 20 '16 at 18:10
  • Ok thank I solved it with this:replace compile 'com.google.android.gms:play-services:9.4.0' to compile 'com.google.android.gms:play-services-maps:9.4.0' Compile 'com.google.android.gms:play-services-location:9.4.0' and enable MultiDex – sadegh sarvi Sep 20 '16 at 19:04
  • @sadeghsarvi your welcome. Mark it as correct answer. It'll help me. Thanks – Vishal Puri Sep 22 '16 at 04:57