如何查找使用Androidx的库



我正在使用React Native,并且由于此错误,我的Android项目不再编译:

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:28:5-109:19 to override.

我试图添加该标签,但我会遇到错误!!我试图删除所有包含Androidx支持或如何修复此错误的软件包,但是我已经陷入了几天!

谢谢!

这可能与Google Place Services上的Google更新有关。您可以在此命令中找到哪个库使用Androidx:

gradlew app:dependencies

应用程序是您的模块/项目的名称,但这通常是默认一个。

如果您无法以此方式解决,请发布您的项目和应用程序build.gradle

确保您从此处导入Androidx的正确版本:https://developer.android.com/jetpack/androidx/migrate

我一天也被卡住了,这也只是因为整合了错误的版本。因此,请确保检查一下。

最新更新