![](/img/trans.png)
[英]Updating Android Studio 3.2 and show gradle project sync failed
[英]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.