0
我試圖在使用Maven回購的項目中包含JWPlayer。問題是圖書館的衝突與com.google.android.gms:play-services-auth:9.6.1
Android JWPlayer與Play服務發生衝突
錯誤消息:
All com.google.android.gms libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 9.6.1, 8.3.0. Examples include com.google.android.gms:play-services-basement:9.6.1 and com.google.android.gms:play-services-ads:8.3.0
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)
我嘗試使用以下行排除庫,但沒有奏效
compile ('com.longtailvideo.jwplayer:jwplayer-android-sdk:+') {
exclude module('com.google.android.gms:play-services-auth:8.3.0')
}
任何想法如何解決這個問題?
的build.gradle內容:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "xxxxxxxxxxxxx"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.google.firebase:firebase-core:9.6.1'
compile 'com.google.firebase:firebase-database:9.6.1'
compile 'com.google.firebase:firebase-crash:9.6.1'
compile 'com.google.firebase:firebase-auth:9.6.1'
compile 'com.google.firebase:firebase-messaging:9.6.1'
compile 'com.google.android.gms:play-services-auth:9.8.0'
compile 'com.facebook.android:facebook-android-sdk:4.15.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.exoplayer:exoplayer:r2.0.1'
compile ('com.longtailvideo.jwplayer:jwplayer-android-sdk:+'){
exclude group: 'com.android.support'
exclude group: 'com.google.android.gms'
}
}
apply plugin: 'com.google.gms.google-services'
很滿意pom的建議,真的很有幫助!問題是構建仍然失敗,出現另一個錯誤:'錯誤:執行任務失敗':app:processDebugGoogleServices'。 >請通過更新google-services插件的版本或將com.google.android.gms的版本更新爲9.6.1來修復版本衝突。「任何想法爲什麼? –
是的,我嘗試了以上所有 –
我已經發布build.gradle內容 –