2016-10-23 22 views
0

Mavenレポを使用してプロジェクトにJWPlayerを組み込もうとしています。私は次の行を使用して、ライブラリを除外しようとしたが、それはAndroid JWPlayerとPlayサービスとの競合

compile ('com.longtailvideo.jwplayer:jwplayer-android-sdk:+') { 
    exclude module('com.google.android.gms:play-services-auth:8.3.0') 
} 

どのように任意のアイデアを動作しませんでした

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.) 

:問題はcom.google.android.gms:play-services-auth:9.6.1

エラーメッセージとライブラリの競合でありますこれを解決するには?

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' 

答えて

2

まずあなたがjwplayerのpomを読み取ることがありますが、あなたの依存関係の依存関係のリストを見つけることができます。そして、あなたはモジュールを除外することを決定することができます。

compile ('com.longtailvideo.jwplayer:jwplayer-android-sdk:+') { 
    exclude module: 'appcompat-v7' 
    exclude module: 'play-services-ads' 
} 

またはグループ:

compile ('com.longtailvideo.jwplayer:jwplayer-android-sdk:+') { 
    exclude group: 'com.android.support' 
    exclude group: 'com.google.android.gms' 
} 

またはグループのモジュール:

compile ('com.longtailvideo.jwplayer:jwplayer-android-sdk:+') { 
    exclude group: 'com.android.support', module: 'appcompat-v7' 
    exclude group: 'com.google.android.gms', module: 'play-services-ads' 
} 

を、ニーズに応じて。

+0

pomアドバイスで本当に便利です!問題は、ビルドがまだ別のエラーで失敗していることです: 'エラー:タスク ':app:processDebugGoogleServices'の実行に失敗しました。 > Googleのサービスプラグインのバージョンを更新するか、com.google.android.gmsのバージョンを9.6.1に更新するかのいずれかで、バージョンの競合を解決してください。 –

+0

はい私は上記のすべてを試しました –

+0

私はbuild.gradleの内容を投稿しました –

関連する問題