![](/img/trans.png)
[英]android manifest merger failed after adding Firebase UI to my dependency
[英]Manifest merger Failed after adding Google Firebase Authentication
將Firebase身份驗證添加到應用程序實施后,出現了清單合並失敗錯誤。
“清單合並失敗,出現多個錯誤,請參閱日志”
我嘗試使用不同版本的身份驗證,但是沒有用。 StackOverflow中針對相同類型問題的解決方案對我不起作用。
我嘗試了合並清單中的建議更改,但此錯誤再次出現
合並錯誤:錯誤:為屬性android:appComponentFactory在第6行指定了tools:replace,但未指定新值app主清單(此文件),第5行錯誤:驗證失敗,退出了app主清單(此文件)
<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:appComponentFactory">
<activity android:name=".VerifyEmployeeID"></activity>
<activity android:name=".SignUp" />
<activity android:name=".login" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-auth:16.0.5'
//firebase database
implementation 'com.google.firebase:firebase-database:16.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
我需要擺脫這個錯誤。
發生這種情況是因為您使用的是簡單依賴項或androidx支持依賴項。 這就是發生此錯誤的原因。
刪除Manifest.xml中的行下方
tools:replace =“ android:appComponentFactory”
在build.gradle中使用此依賴項
實施'com.google.firebase:firebase-core:16.0.9'
實施'com.google.firebase:firebase-auth:17.0.0'
刪除build.gradle文件中的所有androidx依賴項並同步項目。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.