Я работаю в приложении с естественной реакцией. Ранее приложение работало без ошибок. Внезапно приложение вылетает при запуске. В журнале нет ошибок, и я попытался adb logcat
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf;
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at com.google.android.gms.auth.api.Auth.<clinit>(Unknown Source:0)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at co.apptailor.googlesignin.RNGoogleSigninModule$1.run(RNGoogleSigninModule.java:120)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:790)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7000)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.api.Api$zzf" on path: DexPathList[[zip file "/data/app/com.thfm-eBstgIMhhMpfYK-WZbNdew==/base.apk"],nativeLibraryDirectories=[/data/app/com.thfm-eBstgIMhhMpfYK-WZbNdew==/lib/arm, /data/app/com.thfm-eBstgIMhhMpfYK-WZbNdew==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
01-24 17:42:47.566 20134 20134 E AndroidRuntime: ... 9 more
01-24 17:42:47.612 20134 20139 I zygote : Compiler allocated 5MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
01-24 17:42:47.675 3005 3703 D LocationManagerService: getLastLocation: Request[ACCURACY_FINE gps requested=0 fastest=0 num=1]
01-24 17:42:47.677 20134 20202 I ReactNativeJS: [CodePush] App is up to date.
Didn't find class "com.google.android.gms.common.api.Api$zzf" on path: DexPathList[[zip file "/data/app/com.thfm-eBstgIMhhMpfYK-WZbNdew==/base.apk"],nativeLibraryDirectories=[/data/app/com.thfm-eBstgIMhhMpfYK-WZbNdew==/lib/arm, /data/app/com.thfm-eBstgIMhhMpfYK-WZbNdew==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]]
build.gradle
apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion 27
buildToolsVersion "27.0.1"
defaultConfig {
applicationId "com.thfm"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) {
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
compile project(':appcenter-push')
compile(project(':react-native-device-info')){
exclude group: 'com.google.android.gms', module: 'play-services-gcm'
}
compile project(':react-native-fetch-blob')
compile project(':react-native-image-crop-picker')
compile project(':react-native-vector-icons')
compile project(':react-native-version-number')
compile project(':react-native-code-push')
//compile project(':react-native-sentry')
compile project(':appcenter')
compile project(':appcenter-crashes')
compile project(':appcenter-analytics')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:27.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile 'com.google.firebase:firebase-core:11.8.0'
compile(project(":react-native-google-signin")){
exclude group: "com.google.android.gms" // very important
}
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile project(':react-native-fbsdk')
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
"реагировать": "16.2.0",
«реактивный-нативный»: «0,52,0»,
"Reaction-native-fbsdk": "^ 0.8.0",
Я не знаю, в чем именно ошибка, но, кажется, причина в этом.