Manifest merger failed, error on compiling

后端 未结 2 1953
野趣味
野趣味 2020-12-19 06:26

Since downloading the latest SDK and installing Android Studio, my project fails to build. I get the following message:

Manifest merger failed with

相关标签:
2条回答
  • 2020-12-19 07:08

    I faced the same situation while implementing the maps api in my application. I solved it by adding the following code in AndroidManifest.xml and Gradle.properties file.

    In AndroidMainfest.xml added this code

        android:appComponentFactory="androidx.core.app.CoreComponentFactory"
        tools:replace="android:appComponentFactory"
    

    In gradle.properties added this code

       android.useAndroidX=true
       android.enableJetifier=true
    
    0 讨论(0)
  • 2020-12-19 07:15

    "tools:replace="android:appComponentFactory" <- this line you're saying to Manifest merger that you're going to provide new value for android:appComponentFactory attribute but you're not doing so. So as I see it you have two options:

    1. Remove tools:replace="android:appComponentFactory"

    2. Provide new value for android:appComponentFactory" attribute

    Hope it helps.

    0 讨论(0)
提交回复
热议问题