内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用
Gradle文件是
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:support-v4:21.0.3' compile 'com.android.support:appcompat-v7:21.0.3' compile 'com.android.support:recyclerview-v7:21.0.0' compile 'com.android.support:cardview-v7:21.0.0' compile 'com.google.android.gms:play-services:7.0.+' compile 'com.android.support:mediarouter-v7:21.0.3' compile 'com.squareup:otto:1.3.5' compile 'com.squareup.picasso:picasso:2.3.4' compile 'com.squareup.okhttp:okhttp:2.2.0' compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0' compile 'com.squareup.retrofit:retrofit:1.9.0' compile 'com.github.ksoichiro:android-observablescrollview:1.4.0' compile 'com.astuetz:pagerslidingtabstrip:1.0.1' compile 'com.facebook.android:facebook-android-sdk:4.1.0' compile 'com.parse.bolts:bolts-android:1.+' compile 'com.edmodo:rangebar:1.0.0' compile 'com.melnykov:floatingactionbutton:1.3.0' compile project(':library_viewpager') compile project(':androidHorizontalListView') compile project(':CastCompanionLibrary') compile project(':mobihelp_sdk_android_v1.4') compile fileTree(include: 'Parse-*.jar', dir: 'libs') compile files('libs/Parse-1.9.2.jar') compile files('libs/GoogleConversionTrackingSdk-2.2.2.jar') }
CastCompanionLibrary
dependencies { compile 'com.android.support:appcompat-v7:22.+' compile 'com.android.support:mediarouter-v7:22.+' compile 'com.google.android.gms:play-services-cast:7.5.0' }
如何解决这个问题呢?
已经定义了:
dependencies { ... compile 'com.google.android.gms:play-services-cast:7.5.0' }
和
dependencies { ... compile 'com.google.android.gms:play-services:7.0.+' ... }
从GoogleServices7.5.0开始
dependencies { ... compile 'com.google.android.gms:play-services:7.0.+' ... }
使用
dependencies { ... compile 'com.google.android.gms:play-services-maps:7.0.+' compile 'com.google.android.gms:play-services-location:7.0.+' compile 'com.google.android.gms:play-services-gcm:7.0.+' ... }