gpt4 book ai didi

android - 播放服务位置 :9. 0.0 生成 java.lang.NoClassDefFoundError : com. google.firebase.FirebaseOptions

转载 作者:太空狗 更新时间:2023-10-29 13:58:44 26 4
gpt4 key购买 nike

我添加编译 'com.google.android.gms:play-services-location:9.0.0' 以使用 Fused Location API。

我在使用 Firebase 库时遇到问题。

05-25 15:15:43.592 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/FirebaseOptions;)
05-25 15:15:43.595 22764-22764/com.produactivity E/dalvikvm: Could not find class 'com.google.firebase.FirebaseOptions', referenced from method com.google.firebase.FirebaseApp.<init>
05-25 15:15:43.595 22764-22764/com.produactivity W/dalvikvm: VFY: unable to resolve check-cast 8585 (Lcom/google/firebase/FirebaseOptions;) in Lcom/google/firebase/FirebaseApp;
05-25 15:15:43.597 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/FirebaseOptions;)
05-25 15:15:43.597 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/FirebaseOptions;)
05-25 15:15:43.597 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/FirebaseOptions;)
05-25 15:15:43.604 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/FirebaseOptions;)
05-25 15:15:43.616 22764-22764/com.produactivity E/dalvikvm: Could not find class 'com.google.firebase.FirebaseApp$zzb', referenced from method com.google.firebase.FirebaseApp.zzaJ
05-25 15:15:43.616 22764-22764/com.produactivity W/dalvikvm: VFY: unable to resolve check-cast 8581 (Lcom/google/firebase/FirebaseApp$zzb;) in Lcom/google/firebase/FirebaseApp;
05-25 15:15:43.616 22764-22764/com.produactivity I/dalvikvm: Could not find method com.google.firebase.FirebaseOptions.fromResource, referenced from method com.google.firebase.FirebaseApp.zzbu
05-25 15:15:43.616 22764-22764/com.produactivity W/dalvikvm: VFY: unable to resolve static method 61478: Lcom/google/firebase/FirebaseOptions;.fromResource (Landroid/content/Context;)Lcom/google/firebase/FirebaseOptions;
05-25 15:15:43.617 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/FirebaseOptions;)
05-25 15:15:43.618 22764-22764/com.produactivity E/dalvikvm: Could not find class 'com.google.firebase.FirebaseApiNotAvailableException', referenced from method com.google.firebase.FirebaseApp.getToken
05-25 15:15:43.618 22764-22764/com.produactivity W/dalvikvm: VFY: unable to resolve new-instance 8579 (Lcom/google/firebase/FirebaseApiNotAvailableException;) in Lcom/google/firebase/FirebaseApp;
05-25 15:15:43.618 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/auth/FirebaseUser;)
05-25 15:15:43.618 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/auth/FirebaseUser;)
05-25 15:15:43.620 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/FirebaseOptions;)
05-25 15:15:43.622 22764-22764/com.produactivity I/dalvikvm: Could not find method com.google.firebase.FirebaseOptions.getApplicationId, referenced from method com.google.firebase.FirebaseApp.zzNV
05-25 15:15:43.622 22764-22764/com.produactivity W/dalvikvm: VFY: unable to resolve virtual method 61479: Lcom/google/firebase/FirebaseOptions;.getApplicationId ()Ljava/lang/String;
05-25 15:15:43.623 22764-22764/com.produactivity W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/firebase/auth/FirebaseUser;)
05-25 15:15:43.623 22764-22764/com.produactivity E/dalvikvm: Could not find class 'com.google.firebase.FirebaseApp$zza', referenced from method com.google.firebase.FirebaseApp.zza
05-25 15:15:43.623 22764-22764/com.produactivity W/dalvikvm: VFY: unable to resolve check-cast 8580 (Lcom/google/firebase/FirebaseApp$zza;) in Lcom/google/firebase/FirebaseApp;
05-25 15:15:43.643 22764-22764/com.produactivity W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41bcac98)
05-25 15:15:43.643 22764-22764/com.produactivity W/dalvikvm: threadid=1: uncaught exception occurred
05-25 15:15:43.643 22764-22764/com.produactivity W/System.err: java.lang.NoClassDefFoundError: com.google.firebase.FirebaseOptions
05-25 15:15:43.651 22764-22764/com.produactivity W/System.err: at com.google.firebase.FirebaseApp.zzbu(Unknown Source)
05-25 15:15:43.651 22764-22764/com.produactivity W/System.err: at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
05-25 15:15:43.651 22764-22764/com.produactivity W/System.err: at android.content.ContentProvider.attachInfo(ContentProvider.java:1638)
05-25 15:15:43.651 22764-22764/com.produactivity W/System.err: at android.content.ContentProvider.attachInfo(ContentProvider.java:1609)
05-25 15:15:43.651 22764-22764/com.produactivity W/System.err: at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
05-25 15:15:43.651 22764-22764/com.produactivity W/System.err: at android.app.ActivityThread.installProvider(ActivityThread.java:5114)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4688)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4628)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at android.app.ActivityThread.access$1500(ActivityThread.java:157)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at android.os.Handler.dispatchMessage(Handler.java:110)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at android.os.Looper.loop(Looper.java:193)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5398)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at java.lang.reflect.Method.invokeNative(Native Method)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at java.lang.reflect.Method.invoke(Method.java:515)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:940)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
05-25 15:15:43.652 22764-22764/com.produactivity W/System.err: at dalvik.system.NativeStart.main(Native Method)
05-25 15:15:43.653 22764-22764/com.produactivity W/dalvikvm: threadid=1: calling UncaughtExceptionHandler
05-25 15:15:43.665 22764-22764/com.produactivity E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.produactivity, PID: 22764
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:1638)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1609)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5114)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4688)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4628)
at android.app.ActivityThread.access$1500(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1434)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5398)
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:940)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
at dalvik.system.NativeStart.main(Native Method)

我的应用等级有下一个配置

buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}


android {
compileSdkVersion 23
buildToolsVersion "24.0.0 rc4"

packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}

defaultConfig {
applicationId "com.p"
versionCode 1
versionName "Test"
minSdkVersion 16
targetSdkVersion 23

multiDexEnabled true
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'

provided "org.projectlombok:lombok:1.12.6"

compile fileTree(dir: 'libs', include: 'Parse-1.10.3.jar')
compile 'com.parse.bolts:bolts-android:1.1.2'

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services-location:9.0.0'

compile 'com.fasterxml.jackson.core:jackson-annotations:2.4.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.2'
compile 'com.fasterxml.jackson.core:jackson-core:2.4.2'

compile 'com.github.satyan:sugar:1.3.1'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}

compile 'com.android.support:multidex:1.0.0'
}

我已将所有工具更新到最新版本。

最佳答案

  1. 从 Android SDK Manager > Extras 将您的“Google Play 服务”更新到修订版 30。
  2. 将行 compile 'com.android.support:multidex:1.0.1' 添加到您的依赖项中。
  3. 将此添加到 list 中的应用程序标签:android:name="android.support.multidex.MultiDexApplication"

关于android - 播放服务位置 :9. 0.0 生成 java.lang.NoClassDefFoundError : com. google.firebase.FirebaseOptions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37448610/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com