有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java致命异常:使用Firebase的令牌刷新器

当我试图通过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/安卓/gms/dynamite/DynamiteModule$VersionPolicy; in class Lcom/google/安卓/gms/dynamite/DynamiteModule; or its superclasses (declaration of 'com.google.安卓.gms.dynamite.DynamiteModule' appears in /data/app/com.ruzzimedia.projecttaskr-XxKs9V7Uuo8sUAVGakw3-Q==/split_lib_dependencies_apk.apk)

我尝试过更新我的依赖项,结果也是一样的错误。我目前使用的是最新的gradle dependency版本,无法找到错误原因。我也不确定我的应用程序中的DynamicModule是什么

我的Gradle相关性如下所示:

dependencies {
    def nav_version = "1.0.0-alpha08"

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.google.安卓.material:material:1.1.0-alpha02'
    implementation "安卓.arch.navigation:navigation-fragment:1.0.0-alpha08"
    implementation "安卓.arch.navigation:navigation-ui:1.0.0-alpha08"
    implementation '安卓x.appcompat:appcompat:1.0.2'
    implementation '安卓x.constraintlayout:constraintlayout:2.0.0-alpha2'
    implementation '安卓x.recyclerview:recyclerview:1.1.0-alpha01'
    implementation '安卓x.legacy:legacy-support-v4:1.0.0'
    implementation '安卓x.constraintlayout:constraintlayout:2.0.0-alpha2'
    implementation "安卓x.lifecycle:lifecycle-extensions:2.0.0"
    implementation '安卓x.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'
    安卓TestImplementation '安卓x.test:runner:1.1.1'
    安卓TestImplementation '安卓x.test.espresso:espresso-core:3.1.1'
}

apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck(true)

共 (0) 个答案