私のアプリケーションにFire Base
を実装しようとしています。 Lollipop
以上で動作します。Android:Fire Baseが4.4.4で動作しない
前ロリポップの実行中にエラーを取得しています:私のGradleで
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)
:
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'
}
私は依存関係としてMultiDex
を追加し、デフォルトの設定でそれを有効にすることでしよう。しかし、解決策を修正しないでください。
私は問題が64kの参照限度
だと思う。しかし、それを修正する方法がわかりません。
の可能性のある重複した[例外java.lang.NoClassDefFoundErrorが取得:新しいfirebaseにアップデートした後com.google.firebase.FirebaseOptions](http://stackoverflow.com/questions/ 37360126/getting-exception-java-lang-noclassdeffounderror-com-google-firebase-firebaseop) – Abbas
Multidexを正しく設定していれば、logcat出力の 'I/MultiDex:install done'にこのメッセージが表示されます。あなたはそのメッセージを見ますか?そうでない場合は、マニフェストの変更を含む[Multidexを有効にする手順](https://developer.android.com/studio/build/multidex.html#mdex-gradle)をご覧ください。 –