【发布时间】:2015-12-29 07:40:27
【问题描述】:
我想在我的应用程序中使用 gcm,但是在 gradle 文件中添加依赖项时,我收到了不兼容库的错误。 我的应用程序级 gradle 文件具有如下依赖项..
apply plugin: 'com.google.gms.google-services'
.
.
.
.
.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.6.0'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2'
compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.appvirality:AppviralityUI:1.1.18+'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
}
我已经添加了classpath 'com.google.gms:google-services:1.5.0-beta2'
在我的项目级 gradle 中。
我的 google play 服务已更新到最新版本,但仍然显示错误,例如..
所有库必须使用完全相同的版本规范。
检查后我知道它与compile 'com.appvirality:AppviralityUI:1.1.18+' library 冲突。
谢谢
【问题讨论】:
-
#Newbiee : 检查我的答案developers.google.com/android/guides/setup
标签: android gradle android-support-library