AndroidX和places:places compat给出错误:清单合并失败,出现多个错误,请参阅日志

AndroidX和places:places compat给出错误:清单合并失败,出现多个错误,请参阅日志,android,android-manifest,google-places-api,androidx,Android,Android Manifest,Google Places Api,Androidx,我必须将我的旧项目迁移到AndroidX,并将所有依赖项更新到最新版本,但唯一一个在清单合并中出错 只有此依赖项收到错误:清单合并失败,出现多个错误,请参阅日志: implementation 'com.google.android.libraries.places:places-compat:2.1.0' 我的意思是,当我删除它时,错误就消失了 这是我的应用程序。构建 apply plugin: 'com.android.application' android {

我必须将我的旧项目迁移到AndroidX,并将所有依赖项更新到最新版本,但唯一一个在清单合并中出错

只有此依赖项收到错误:清单合并失败,出现多个错误,请参阅日志:

implementation 'com.google.android.libraries.places:places-compat:2.1.0'
我的意思是,当我删除它时,错误就消失了

这是我的应用程序。构建

apply plugin: 'com.android.application' android { compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.pertamina.tbbm.rewulu.ecodriving.mobil" minSdkVersion 16 targetSdkVersion 28 versionCode 12 versionName "5.5.1" multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } } dexOptions { javaMaxHeapSize "8g" } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.squareup.retrofit2:retrofit:2.3.0' implementation 'com.squareup.retrofit2:converter-gson:2.3.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1' implementation 'com.google.android.material:material:1.0.0' implementation 'com.sothree.slidinguppanel:library:3.4.0' implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' implementation 'com.google.android.gms:play-services-auth:17.0.0' implementation 'com.google.android.gms:play-services-maps:17.0.0' implementation 'com.google.android.libraries.places:places:2.1.0' implementation 'com.google.android.libraries.places:places-compat:2.1.0' implementation 'com.facebook.android:facebook-android-sdk:4.42.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2' implementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } apply plugin: 'com.google.gms.google-services' 应用插件:“com.android.application” 安卓{ 编译DK28版 buildToolsVersion“28.0.3” 默认配置{ 应用程序ID“com.pertamina.tbbm.rehulu.ecodriving.mobil” 明斯克版本16 targetSdkVersion 28 版本代码12 版本名称“5.5.1” 多索引启用真 } 建筑类型{ 释放{ minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard rules.pro' signingConfig signingConfigs.release } } 德克斯选项{ javaMaxHeapSize“8g” } } 依赖关系{ 实现文件树(目录:“libs”,包括:['*.jar']) 实现“androidx.appcompat:appcompat:1.1.0” 实现“androidx.vectordrawable:vectordrawable动画:1.1.0” 实现“androidx.legacy:legacy-support-v4:1.0.0” 实现“androidx.recyclerview:recyclerview:1.0.0” 实现“androidx.cardview:cardview:1.0.0” 实现“androidx.multidex:multidex:2.0.1” 实现'com.google.code.gson:gson:2.8.5' 实现'com.squareup.Reformation2:Reformation:2.3.0' 实现'com.squareup.Reformation2:converter gson:2.3.0' 实现'com.squareup.okhttp3:logging interceptor:3.9.1' 实现'com.google.android.material:material:1.0.0' 实现'com.sothree.slidinguppanel:library:3.4.0' 实现'com.nostra13.universalimageloader:universalimageloader:1.9.5' 实现'com.google.android.gms:play services auth:17.0.0' 实现'com.google.android.gms:play services地图:17.0.0' 实现'com.google.android.libraries.places:places:2.1.0' 实现'com.google.android.libraries.places:places compat:2.1.0' 实现'com.facebook.android:facebook android sdk:4.42.0' 实现“androidx.constraintlayout:constraintlayout:1.1.3” 实现'com.github.PhilJay:MPAndroidChart:v3.0.2' 实现“junit:junit:4.12” androidTestImplementation'androidx.test:runner:1.2.0' AndroidTest实现“androidx.test.espresso:espresso核心:3.2.0” } 应用插件:“com.google.gms.googleservices” 这里是Manifest.xml

我真的不知道我的配置有什么问题…在网上找了一整天,但什么都没有得到

NB:当我迁移到AndroidX时,按Refractor>migrate to AndroidX会出现警告,弹出窗口显示项目中未找到任何用法


谢谢

尝试从您的应用程序build.gradle文件中删除实现
'com.google.android.libraries.places:places:2.1.0'
,应该可以正常工作

您是否尝试过按如下方式替换依赖项

    implementation "com.google.android.libraries.places:places:1.1.0"


试试看,这是我的解决方案