2016-08-20 41 views
0

試圖執行的GCM通知的版本,拿到了衝突錯誤錯誤:請修正版本衝突或者通過更新的谷歌服務插件

**錯誤:執行失敗的任務「:應用程序: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 8.3.0.**

dependencies { 
compile project(':viewPagerIndicator') 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4' 
compile 'com.android.support:appcompat-v7:24.2.0' 
compile 'org.apache.httpcomponents:httpclient:4.5' 
compile 'com.android.support:recyclerview-v7:24.2.0' 
compile 'com.google.android.gms:play-services:9.4.0' 
compile 'com.facebook.android:facebook-android-sdk:4.0.0' 
compile 'com.koushikdutta.ion:ion:2.+' 
compile 'com.github.bumptech.glide:glide:3.6.1' 
compile 'com.android.support:multidex:1.0.0' 
compile 'com.google.android.gms:play-services-ads:9.4.0' 
compile 'com.google.android.gms:play-services-auth:9.4.0' 
compile 'com.google.android.gms:play-services-gcm:9.4.0' 
//classpath 'com.splunk:mint-gradle-android-plugin:5.1.0' 
// compile 'com.splunk:mint-android-sdk:5.1.0' 
//compile 'com.splunk:mint-android-instrumentation-okhttp:5.1.0' 
compile 'com.splunk.mint:mint:5.0.0' 

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

這裏是我的應用搖籃

buildscript { 
repositories { 
    jcenter() 
maven{ 
url "https://mint.splunk.com/gradle/" 
} 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:2.1.3' 
    classpath 'com.google.gms:google-services:1.5.0-beta2' 
    classpath 'com.android.tools.build:gradle:2.0.0-alpha6' 

} 
} 
+0

請幫我我可以做什麼? – ahmad

回答

0

應該有更強的解釋錯誤日誌在logcat中。它出現在您報告的錯誤消息Error:Execution failed for task ':app:processDebugGoogleServices之前。 請發佈完整的錯誤日誌消息。

另外,我看到在應用程序gradle中有兩個用於gradle的依賴項;這classpath 'com.android.tools.build:gradle:2.1.3'和這classpath 'com.android.tools.build:gradle:2.0.0-alpha6'。我建議只保留classpath 'com.android.tools.build:gradle:2.1.3'和ALSO 加入classpath 'com.google.gms:google-services:1.3.0-beta1'這個gradle。

檢查您的cradle-wrapper.properties以包含distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zipdistributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip而不是那些alpha版本。

如果問題仍然存在,請將完整的錯誤消息(最好是logcat中的整個日誌)加上模塊gradle文件的build-tools,targetsdk和compileSdk版本。

1

由於您使用的是v.9.4.0你必須使用谷歌播放服務插件的v.3.0.0:

dependencies { 
    classpath 'com.android.tools.build:gradle:2.1.3' 
    classpath 'com.google.gms:google-services:3.0.0' 
} 
+0

您如何知道gms需要哪個版本的Google Play服務插件?具體來說,您是如何將版本9.4.0與google play services插件的v3.0.0鏈接的? –

+0

@TonyChan在這裏所有的信息。 https://developers.google.com/android/guides/google-services-plugin –

+0

我已閱讀該頁面,但沒有看到最低要求列表。我正在想象一個表格或某些特定版本的gms與特定版本的插件相關的東西。即使發佈說明也沒有提及何時需要新的插件版本。 –

相關問題