[英]java.lang.NoSuchMethodError: No static method checkArgument(Z)V in class Lcom/facebook/common/internal/Preconditions;
[英]java.lang.NoSuchMethodError: No static method in class Lcom/google/android/gms/common/util/zzu;
更新我的庫和錯誤日志后,應用程序崩潰:
java.lang.NoSuchMethodError: No static method getNoBackupFilesDir(Landroid/content/Context;)
in class Lcom/google/android/gms/common/util/zzu; at com.google.android.gms.iid.zzh.<init>(Unknown Source) at com.google.android.gms.iid.zzh.<init>(Unknown Source) at com.google.android.gms.iid.InstanceID.zza(Unknown Source) at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source) at com.quickblox.messages.services.a.c.<init>(Unknown Source) at com.quickblox.messages.services.a.d.a(Unknown Source) at com.quickblox.messages.services.SubscribeService.a(Unknown Source) at com.quickblox.messages.services.SubscribeService.a(Unknown Source) at com.quickblox.messages.services.SubscribeService.b(Unknown Source) at com.quickblox.messages.services.SubscribeService.c(Unknown Source) at com.quickblox.messages.services.SubscribeService.onHandleIntent at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.os.HandlerThread.run(HandlerThread.java:61)
我的圖書館版本:
compileSdkVersion 25
buildToolsVersion '26.0.3'
defaultConfig {
multiDexEnabled true
minSdkVersion 16
targetSdkVersion 25
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.google.android.gms:play-services-places:11.6.2'
compile 'com.google.android.gms:play-services-location:11.6.2'
compile 'com.google.firebase:firebase-messaging:11.6.2'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.quickblox:quickblox-android-sdk-core:3.4'
compile 'com.quickblox:quickblox-android-sdk-videochat-webrtc:3.4'
compile 'com.quickblox:quickblox-android-sdk-messages:3.4'
}
apply plugin: 'com.google.gms.google-services'
我們需要使用相同版本的庫。 我正在使用quickblox sdk。 為了在項目中使用具有相同版本的所有庫,這是必需的(Quickblox SDK中此庫的版本為11.4.2,但我們項目中的所有庫必須為相同版本)我解決了此問題,在我的build.gradle.
添加了兩個庫build.gradle.
compile "com.google.firebase:firebase-core:11.6.2"
compile "com.google.android.gms:play-services-gcm:11.6.2"
只需將您的Google Play Service
版本更新到app level build.gradle file
最新版本app level build.gradle file
。
eg. :- compile 'com.google.android.gms:play-services-places:12.0.0'
和
將您的Firebase version
升級到Google Play服務版本的最新版本。
e.g:- compile 'com.google.firebase:firebase-core:12.0.0'
compile 'com.google.firebase:firebase-messaging:12.0.0'
在快照升級中,您將應用程序級別build.gradle文件中的所有依賴項都更新到最新版本,並確保您的Firebase和Google Play服務依賴項版本相同。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.