Android 添加 Dependencies 报错 Manifest merger failed

   Develop  Android    Android  Develop

错误信息

1
2
3
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:6:5-25:19 to override.

解决方案 修改AndroidManifest.xml文件

1
2
3
4
5
6
7
8
9
10
11
12
13
<?xml version="1.0" encoding="utf-8"?>
<manifest
...
xmlns:tools="http://schemas.android.com/tools">
...
<!-- 添加如下属性 -->
<application
...
tools:replace="android:appComponentFactory"
android:appComponentFactory="@string/app_name">
...
</application>
</manifest>
  1. 错误信息
  2. 解决方案 修改AndroidManifest.xml文件
Oracle 修改数据库文件大小
Android APK 反编译