bugfix> android > 投稿

私のプロジェクトの依存関係は次のとおりです。

dependencies {
    classpath 'com.android.tools.build:gradle:3.1.3'
    classpath 'com.google.gms:google-services:4.0.1'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

以下のように、元の依存関係を変更した後:

dependencies {
    implementation 'com.android.support:support-v4:27.0.1'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:26.0.1'
    implementation 'com.android.support:design:27.0.1'
    implementation 'com.google.android.gms:play-services-auth:15.0.1'
    implementation 'com.google.android.gms:play-services-ads:15.0.1'
    implementation 'com.google.android.gms:play-services-wearable:15.0.1'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    implementation 'com.google.firebase:firebase-auth:16.0.1'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.google.firebase:firebase-messaging:17.0.0'
    implementation 'com.firebaseui:firebase-ui:2.3.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    implementation 'com.gongwen:marqueelibrary:1.1.3'
    implementation 'devlight.io:navigationtabbar:1.2.5'
    implementation 'me.itangqi.waveloadingview:library:0.3.5'
    implementation 'com.yanzhenjie:recyclerview-swipe:1.1.4'
    implementation 'com.squareup.okhttp3:okhttp:3.2.0'
    implementation 'com.squareup.okio:okio:1.7.0'
    implementation 'com.google.firebase:firebase-ml-vision:16.0.0'
    implementation 'com.android.support:multidex:1.0.0'
}
apply plugin: 'com.android.application'

次に、firebase MLの依存関係を追加し、

com.google.firebase:firebase-ml-vision:16.0.0  

Gradleビルドが失敗し、次のメッセージが表示されました。

Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available athttps://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 11.4.2.

誰も私がこの問題を解決するのを手伝ってもらえますか?

回答 1 件
  • 以下を更新します。

    compile 'com.google.firebase:firebase-auth:11.4.2'
    compile 'com.google.firebase:firebase-database:11.4.2'
    compile 'com.google.firebase:firebase-messaging:11.4.2'
    
    

    これに:

    implementation 'com.google.firebase:firebase-auth:16.0.1'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation 'com.google.firebase:firebase-messaging:17.0.0'
    
    

    また、Google Play Services APIを最新バージョンに更新します

    そして、最上位のgradleファイルで:

    変化する:

    classpath 'com.google.gms:google-services:3.1.0'
    
    

    これに:

    classpath 'com.google.gms:google-services:4.0.1'
    
    

あなたの答え