我在添加Firebase依赖项时遇到Manifest合并失败并出现多个错误的情况
我尝试添加tools:replace
标签,这就是添加错误的原因。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ecommerce"
xmlns:tools="http://schemas.android.com/tools"
>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:allowBackup,icon,theme,label,name">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
没有
如果您有尚未迁移到AndroidX命名空间的任何Maven依赖项,则在gradle.properties文件中将以下两个标志设置为true时,Android Studio构建系统也会为您迁移这些依赖项:
android.useAndroidX=true
android.enableJetifier=true
欲了解更多,请点击这里
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句