【问题标题】:update the version of the google-services plugin or update com.google.android.gsm to 8.3.0更新 google-services 插件的版本或将 com.google.android.gsm 更新到 8.3.0
【发布时间】:2017-02-17 16:15:22
【问题描述】:

它给了我这个错误 “错误:任务 ':app:processDebugGoogleServices' 执行失败。

请通过更新 google-services 插件的版本(有关最新版本的信息可在 https://bintray.com/android/android-tools/com.google.gms.google-services/ 获得)或将 com.google.android.gms 的版本更新到 8.3.0 来解决版本冲突。" 这是我的 build.gradle (app)

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'


android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.uti.magic"
    manifestPlaceholders = [onesignal_app_id: "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
                            // Project number pulled from dashboard, local value is ignored.
                            onesignal_google_project_number: "REMOTE"]
    minSdkVersion 21
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile files ('libs/aspectjrt-1.7.3.jar')
compile files ('libs/isoparser-1.0-RC-27.jar')
}
buildscript {
dependencies {
    // Add this line
    classpath 'com.google.gms:google-services:2.1.2'
}
}

// Add to the bottom of the file
dependencies {
compile 'com.onesignal:OneSignal:3.+@aar'

// Required for OneSignal, even if you have added FCM.
compile 'com.google.android.gms:play-services-gcm:+'

// Required for geotagging
compile "com.google.android.gms:play-services-location:+"

// play-services-analytics is only needed when using 8.1.0 or older.
// compile 'com.google.android.gms:play-services-analytics:+'
}
apply plugin: 'com.google.gms.google-services'

【问题讨论】:

    标签: java android android-studio gradle android-gradle-plugin


    【解决方案1】:

    移除 app 模块 build.gradle 顶部的 apply plugin: 'com.google.gms.google-services'

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-15
      • 1970-01-01
      • 2023-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多