我的项目使用Firebase Firestore,并且运行良好直到3天前,我对我的项目和Booom进行了完整的测试...我不知道会发生什么,但是我的应用由于异常错误而异常崩溃。
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.teamttdvlp.memolang, PID: 32467
java.lang.RuntimeException: Internal error in Cloud Firestore (21.3.0).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(com.google.firebase:firebase-firestore@@21.3.0:529)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6694)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/protobuf/ByteString;
at com.google.firebase.firestore.remote.WriteStream.<clinit>(com.google.firebase:firebase-firestore@@21.3.0:52)
at com.google.firebase.firestore.local.SQLiteMutationQueue.<init>(com.google.firebase:firebase-firestore@@21.3.0:95)
at com.google.firebase.firestore.local.SQLitePersistence.getMutationQueue(com.google.firebase:firebase-firestore@@21.3.0:166)
at com.google.firebase.firestore.local.LocalStore.<init>(com.google.firebase:firebase-firestore@@21.3.0:138)
at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore@@21.3.0:271)
at com.google.firebase.firestore.core.FirestoreClient.lambda$new$0(com.google.firebase:firebase-firestore@@21.3.0:108)
at com.google.firebase.firestore.core.FirestoreClient$$Lambda$1.run(Unknown Source:8)
at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$2(com.google.firebase:firebase-firestore@@21.3.0:431)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$2.call(Unknown Source:2)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(com.google.firebase:firebase-firestore@@21.3.0:317)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$Lambda$2.run(Unknown Source:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@21.3.0:224)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.protobuf.ByteString" on path: DexPathList[[zip file "/data/app/com.teamttdvlp.memolang-hk2tKyVJBtKM-j-8nqhQ9A==/base.apk"],nativeLibraryDirectories=[/data/app/com.teamttdvlp.memolang-hk2tKyVJBtKM-j-8nqhQ9A==/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
这是我的Gradle文件(模块应用)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 29
buildToolsVersion "29.0.0"
defaultConfig {
applicationId "com.teamttdvlp.memolang"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
// ConstraintLayout
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
// View Model
implementation "android.arch.lifecycle:runtime:$rootProject.viewModelVersion"
implementation "android.arch.lifecycle:extensions:$rootProject.viewModelVersion"
implementation "android.arch.lifecycle:common:$rootProject.viewModelVersion"
implementation "android.arch.lifecycle:livedata:$rootProject.viewModelVersion"
// Testing
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
// Firebase
implementation 'com.google.firebase:firebase-core:17.2.1'
// Google Authentication
implementation 'com.google.android.gms:play-services-auth:17.0.0'
// Firebase Authentication
implementation 'com.google.firebase:firebase-auth:19.2.0'
// Firebase Firestore
implementation 'com.google.firebase:firebase-firestore:21.3.0'
// Facebook Authentication
implementation 'com.facebook.android:facebook-login:5.5.1'
// Dagger 2
implementation "com.google.dagger:dagger:$rootProject.dagger2Version"
implementation "com.google.dagger:dagger-android-support:$rootProject.dagger2Version"
kapt "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
kapt "com.google.dagger:dagger-android-processor:$rootProject.dagger2Version"
// navigation
implementation 'androidx.navigation:navigation-fragment-ktx:2.1.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.1.0'
// room
def room_version = "2.2.0-alpha02"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
} apply plugin: 'com.google.gms.google-services'
这是Gralde File(项目应用程序)
buildscript {
ext.kotlin_version = '1.3.31'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
ext {
dagger2Version = '2.24'
viewModelVersion = '2.2.0-alpha02'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
该错误表明它无法解析com.google.protobuf.ByteString类,因此我检查了库,但它确实不存在
有解决此问题的主意吗?