1

我正在尝试将firebase远程配置添加到我的项目中,但它与我的gms版本冲突,错误代码:

错误:(674, 25) 错误:无法访问 com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable 的 AbstractSafeParcelable 类文件未找到

当我点击它发送给我时,我的项目的这种方法:

    protected void RequestLocation() {
    locationRequest = new LocationRequest();
    locationRequest.setInterval(10000); // for this line
    locationRequest.setFastestInterval(5000);
    locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
}

我尝试了一些在 stackoverflow 本身中找到的建议,例如将 gms 的版本更改为 10.0.1,但最终产生了另一个错误:

错误:任务“:app:processDebugGoogleServices”执行失败。请通过更新 google-services 插件的版本来修复版本冲突(有关最新版本的信息可在https://bintray.com/android/android-tools/com.google.gms.google-services/获得)或将 com.google.android.gms 的版本更新为 9.0.2。

我原来的 build.gradle 可以在这里查看:`apply plugin:

'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '25.0.0'
    defaultConfig {
        applicationId "my.editable.project"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 28
        versionName "1.4.4"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
    lintOptions {
        disable 'MissingTranslation'
        checkReleaseBuilds false
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }
}




dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/ksoap2-android-assembly-3.5.0-jar-with-dependencies.jar')
    //compile files('libs/gcm.jar')
    //compile files('libs/gcm-src.jar')
    compile project(':firebase_plugin')
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.google.android.gms:play-services:9.0.2'
    compile 'com.google.android.gms:play-services-ads:9.0.2'
    compile 'com.google.android.gms:play-services-auth:9.0.2'
    compile 'com.google.android.gms:play-services-gcm:9.0.2'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.firebase:firebase-config:10.0.1'
}




apply plugin: 'com.google.gms.google-services'`
4

0 回答 0