簡體   English   中英

在android studio 3.2中Gradle項目同步失敗

[英]Gradle project Sync failed in android studio 3.2

由於這個錯誤,我無法構建我的項目

錯誤:com.google.android.gms庫:play-services-basement正在[[15.0.1,15.0.1]]的各個其他庫請求,但解析為16.0.1。 禁用插件並使用./gradlew:app:dependencies檢查依賴關系樹。

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation 'com.google.firebase:firebase-auth:16.0.3'
    implementation 'com.google.firebase:firebase-storage:16.0.2'
    implementation 'com.google.firebase:firebase-messaging:17.5.0'
    implementation 'com.firebaseui:firebase-ui-database:4.3.1'
    implementation 'com.github.jgabrielfreitas:BlurImageView:1.0.1'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:animated-vector-drawable:28.0.0-alpha1'
    implementation 'com.android.support:support-media-compat:28.0.0-alpha1'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.rengwuxian.materialedittext:library:2.1.4'
    implementation 'com.google.android.gms:play-services-analytics:16.0.0'
}
apply plugin: 'com.google.gms.google-services'

您需要將所有Play服務和Firebase庫更新到最新版本。

您可以在這里找到每個庫的最新版本https://mvnrepository.com/

嘗試更改播放服務

implementation 'com.google.android.gms:play-services-analytics:16.0.0' to 
implementation 'com.google.android.gms:play-services-analytics:15.0.1'

並嘗試在項目build.gradle中添加以下repos

allprojects {
    repositories {
        google()
        jcenter()
    }
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM