2017-04-24 69 views
1

爲什麼我要問,在每個解決方案中,我只是在底部應用插件的信息,但我有這個,但這不適用於我。我試着在5個小時內做到這一點。我試圖在我的應用程序上實現谷歌地圖後出現錯誤。也許我錯過了代碼中的東西?我不知道問題在哪裏,所以請大家看看代碼,也許你會有什麼想法什麼是錯的。感謝您的建議。Google Play服務要求「更新」回到9.0.0

這是錯誤:

Error:Execution failed for task ':app:processDebugGoogleServices'. 
> Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 9.0.0. 



apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 
    defaultConfig { 
     applicationId "com.company.andrzej.rolki.wroclawnarolkach" 
     minSdkVersion 15 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    configurations.all { 
     resolutionStrategy.force 'com.android.support:support-annotations:22.1.0' 
    } 
    apply plugin: 'com.google.gms.google-services' 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.google.firebase:firebase-ads:10.2.1' 
    compile 'com.jakewharton:butterknife:8.5.1' 
    compile 'com.android.support:support-v4:25.3.1' 
    compile 'com.google.android.gms:play-services-maps:10.2.1' 
    testCompile 'junit:junit:4.12' 
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1' 
    compile 'com.google.firebase:firebase-crash:10.2.1' 
    compile 'com.google.firebase:firebase-core:10.2.1' 
    compile 'com.google.android.gms:play-services-analytics:10.2.1' 
    compile 'com.google.android.gms:play-services-gcm:10.2.1' 
    compile 'com.google.android.gms:play-services-location:10.2.1' 
} 

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

和項目

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.1' 
     classpath 'com.google.gms:google-services:3.0.0' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

回答

1

dependencies塊刪除apply plugin: 'com.google.gms.google-services'線。你寫了兩次。

相關問題