004-AndroidStudio報錯Manifest merger failed : Attribute application@appComponentFactory value=(android.sup


在引入 庫文件時候,AS報錯

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:5:5-20:19 to override.

各種 嘗試后,發現 原來 AS早已經給出提示

 

在清單文件 添加如下代碼

<application

...
android:theme="@style/AppTheme"

android:appComponentFactory=""
tools:replace="android:appComponentFactory">


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM