错误日志是这样的:
ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86
is also present at [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 value=(android.support.v4.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at manifestMerger3684781773578449555.xml:7:5-9:19 to override.
tools:replace="android:appComponentFactory
Error:tools:replace specified at line:15 for attribute android:appComponentFactory, but no new value specified...
gradlew :app:dependencies
执行之后搜索结果.png
注意:在app的build.gradle中添加一些第三方依赖的时候,可能不标明具体版本号,用
+号代替(自动寻找最新版本,耗时耗力),比如:
implementation 'com.android.support:multidex:+'
网友评论