gpt4 book ai didi

android - Gradle 同步失败 - com.google.android.gms :play-services-basement is being requested by various other libraries

转载 作者:行者123 更新时间:2023-11-29 00:58:48 35 4
gpt4 key购买 nike

库 com.google.android.gms:play-services-basement 正在被位于 [[11.0.1,11.0.1], [15.0.1,15.0.1]] 的各种其他库请求,但解析为 15.0.1。禁用插件并使用 ./gradlew :app:dependencies 检查你的依赖关系树。

当我尝试在我的 android 项目中添加 Firebase 时,我遇到了这个错误。我已经做了所有可能的事情来解决这个错误,但我仍然遇到这个错误。请给我一些解决这个问题的建议。

应用级依赖

   repositories {
maven {
url "http://dl.bintray.com/lukaville/maven"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:27.1.1'
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 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.applozic.communication.uiwidget:mobicomkitui:5.8.4'
implementation 'com.facebook.android:facebook-login:4.28.0'
implementation 'com.facebook.android:account-kit-sdk:4.28.0'
implementation 'com.facebook.android:facebook-android-sdk:4.28.0'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.android.gms:play-services-ads:15.0.1'
//noinspection GradleCompatible
implementation 'com.borjabravo:readmoretextview:2.0.1'
implementation 'com.gmail.samehadar:iosdialog:1.0'
implementation 'com.gdacciaro:iosdialog:1.0.3'
implementation 'com.wdullaer:materialdatetimepicker:3.6.0'
implementation 'com.bignerdranch.android:recyclerview-multiselect:0.2'
implementation 'com.wrapp.floatlabelededittext:library:0.0.6'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.github.bumptech.glide:glide:4.7.1'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.ms-square:expandableTextView:0.1.4'
implementation 'com.nbsp:library:1.8'
implementation 'net.gotev:uploadservice:2.1'
implementation 'javax.mail:javax.mail-api:1.5.3'

implementation 'com.google.firebase:firebase-core:16.0.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'
}
apply plugin: 'com.google.gms.google-services'

项目级依赖

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.1.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

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

最佳答案

我不确定这个问题的根本原因(可能是一些黑魔法)。添加:

import com.google.gms.googleservices.GoogleServicesPlugin
GoogleServicesPlugin.config.disableVersionCheck = true

到应用程序级别的 build.gradle 文件。

听取了以下建议: https://github.com/OneSignal/OneSignal-Gradle-Plugin/issues/37

我很沮丧,因为我不明白其中的原因。但这可能会有所帮助。

关于android - Gradle 同步失败 - com.google.android.gms :play-services-basement is being requested by various other libraries,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52574759/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com