Ошибка Android: не удается получить доступ к zzbfm mLocationRequest.setInterval

#java #android #firebase #gradle #google-play-services

# #java #Android #firebase #gradle #google-play-services

Вопрос:

В bulid gradle я сгруппировал все мои зависимости от Firebase в спецификации Firebase.

Я также обновил некоторые зависимости Play Services и получил ошибку ниже.

 error: cannot access zzbfm
mLocationRequest.setInterval(UPDATE_INTERVAL_IN_MILLISECONDS);
                       ^
class file for com.google.android.gms.internal.zzbfm not found
Note: Some input files use or override a deprecated API.
 

Не могли бы вы сказать мне, что я делаю не так?
Как я могу узнать, до какой именно версии я должен обновить свои зависимости?
Любая помощь будет высоко оценена!

мой build.gradle(app)

 apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
    compileSdkVersion 29
    buildToolsVersion '28.0.3'
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "xxx"
        minSdkVersion 21
        targetSdkVersion 29
        versionName '1.5.3.0'
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        versionCode 271
    }
    buildTypes {

        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
    }
    productFlavors {
    }
    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
        exclude module: 'httpclient'
    }
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.google.android.gms:play-services-vision:11.8.0'
    implementation 'com.google.android.gms:play-services-location:11.8.0'
    implementation 'com.google.android.gms:play-services-analytics:17.0.0'
    implementation 'me.anwarshahriar:calligrapher:1.0'
    implementation 'com.baoyz.swipemenulistview:library:1.3.0'
    testImplementation 'junit:junit:4.12'
    implementation 'com.google.apis:google-api-services-storage:v1-rev135- 
    1.23.0'

    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.android.support:support-v4:28.0.0-rc02'
    implementation 'com.android.support:support-v13:28.0.0-rc02'
    implementation 'com.android.support:cardview-v7:28.0.0-rc02'
    implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
    implementation 'com.android.support:recyclerview-v7:28.0.0-rc02'
    implementation 'com.android.support:design:28.0.0-rc02'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation group: 'org.apache.httpcomponents', name: 'httpmime', 
    version: '4.3.1'
    implementation 
    androidTestImplementation 'com.android.support.test:rules:1.0.2'


    implementation platform('com.google.firebase:firebase-bom:26.1.1')
    implementation 'com.google.firebase:firebase-database'
    implementation 'com.google.firebase:firebase-auth'
    implementation 'com.google.firebase:firebase-messaging'
    implementation 'com.google.firebase:firebase-iid'
    implementation 'com.google.firebase:firebase-core'
    implementation 'com.google.firebase:firebase-crash'
    implementation 'com.google.firebase:firebase-firestore'
    implementation 'com.google.firebase:firebase-crashlytics'

}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android-extensions'
repositories {
    mavenCentral()
}
 

Комментарии:

1. Почему вы используете legacy support apis , если вы нацелены api 29 ? Сначала мигрируйте на AndroidX, также эта ошибка может появиться при удалении / удалении класса, выполнении проекта очистки / перестройки, аннулировании кэша, перезапуске.

2. На самом деле я не знаю, почему. Эта кодовая база только что передана мне, и это устаревшая система.