当我尝试通过AndroidStudio运行我的应用程序时,不断出现以下错误:
E/AndroidRuntime: FATAL EXCEPTION: TokenRefresher
Process: com.ruzzimedia.projecttaskr, PID: 31951
java.lang.NoSuchFieldError: No static field PREFER_HIGHEST_OR_REMOTE_VERSION_NO_FORCE_STAGING of type Lcom/google/android/gms/dynamite/DynamiteModule$VersionPolicy; in class Lcom/google/android/gms/dynamite/DynamiteModule; or its superclasses (declaration of 'com.google.android.gms.dynamite.DynamiteModule' appears in /data/app/com.ruzzimedia.projecttaskr-XxKs9V7Uuo8sUAVGakw3-Q==/split_lib_dependencies_apk.apk)
我尝试更新我的依赖项,它导致相同的错误。我当前正在使用最新的gradle依赖版本,但找不到错误的原因。我也不确定在我的应用程序中什么叫DynamiteModule。
我的Gradle依赖关系如下:
dependencies {
def nav_version = "1.0.0-alpha08"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.material:material:1.1.0-alpha02'
implementation "android.arch.navigation:navigation-fragment:1.0.0-alpha08"
implementation "android.arch.navigation:navigation-ui:1.0.0-alpha08"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
implementation "androidx.lifecycle:lifecycle-extensions:2.0.0"
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-firestore:17.1.4'
implementation 'com.firebaseui:firebase-ui-auth:4.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck(true)