java.lang.NoSuchMethodError:没有静态方法类中的checkHandlerThread(Landroid/os/Handler;Ljava/lang/String;)VLcom/google/android/gms/common/internal/Preconditions;或者它的超级类(声明"com.google.android.gms.common.internal.Preconditions"出现在/data/app/tv.ampz-xq0syKD7zk1lwewrOmiHaw==/base.apk!classes35.dex)网址:com.google.android.gms.common.internal.GmsClientEventManager.onConnectionSuccess(未知来源:20)网址:com.google.android.gms.common.api.internal.zaaw.zab(未知来源:292)网址:com.google.android.gms.common.api.internal.zaak.zaaq(未知资料来源:125)网址:com.google.android.gms.common.api.internal.zaak.onConnected(未知资料来源:105)网址:com.google.android.gms.common.api.internal.zabe.onConnected(未知资料来源:101)网址:com.google.android.gms.common.api.internal.zaq.onConnected(未知资料来源:6)网址:com.google.android.gms.common.internal.zaf.onConnected(未知来源:2)网址:com.google.android.gms.common.internal.BaseGmsClient$zzf.zzm(未知资料来源:24)网址:com.google.android.gms.common.internal.BaseGmsClient$zza.zza(未知资料来源:12)网址:com.google.android.gms.common.internal.BaseGmsClient$zzc.zzo(未知资料来源:11)网址:com.google.android.gms.common.internal.BaseGmsClient$zzb.handleMessage(未知资料来源:48)在android.os.Handler.dispatchMessage(Handler.java:106)在android.os.Looper.loop(Looper.java:193)在android.app.ActivityThread.main(ActivityThreads.java:6669)位于java.lang.reflect.Method.ioke(本机方法)网址:com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)网址:com.android.internal.os.ZygoteInit.main(ZygoteNit.java:858)
我的应用程序/build.gradle
compile project(':react-native-maps')
compile project(':react-native-camera')
compile project(':react-native-linear-gradient')
compile project(':react-native-push-notification')
implementation (project(':react-native-camera')) {
implementation "com.android.support:appcompat-v7:26.1.0"
implementation "com.facebook.react:react-native:+"
}
implementation(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
implementation ("com.google.android.gms:play-services-basement:${rootProject.ext.googleFirebaseVersion}") {
force = true
}
implementation "com.google.android.gms:play-services-location:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.android.gms:play-services-base:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.android.gms:play-services-maps:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.firebase:firebase-core:${rootProject.ext.googleFirebaseVersion}"
compile project(':instabug-reactnative')
compile project(':react-native-video')
compile project(':react-native-svg')
compile project(':react-native-picker')
compile project(':react-native-image-crop-picker')
compile project(':react-native-google-places')
compile project(':react-native-fast-image')
compile project(':react-native-exit-app')
compile project(':react-native-device-info')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+"
您必须在android
标签中将resolutionStrategy
添加到您的app/build.gradle中
android {
....
configurations.all {
resolutionStrategy {
force "com.google.android.gms:play-services-basement:16.2.0"
}
}
...
}