1. 程式人生 > >Android-0.Manifest merger failed with multiple errors, see logs

Android-0.Manifest merger failed with multiple errors, see logs

只是說manifest 合併的時候不成功,log並沒有顯示具體的原因,當前圖如下:

要想檢視具體的錯誤資訊,可以點選上面標紅的圖示 詳細錯誤資訊如下:
F:\OpenSource_Git\Android\Xvideo\app\src\main\AndroidManifest.xml:6:9-35 Error:
	Attribute [email protected] value=(true) from AndroidManifest.xml:6:9-35
	is also present at [:third:fw] AndroidManifest.xml:12:9-36 value=(false).
	Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at AndroidManifest.xml:5:5-19:19 to override.
F:\OpenSource_Git\Android\Xvideo\app\src\main\AndroidManifest.xml:11:9-40 Error:
	Attribute 
[email protected]
value=(@style/AppTheme) from AndroidManifest.xml:11:9-40 is also present at [:third:fw] AndroidManifest.xml:14:9-42 value=(@style/FWAppTheme). Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:5:5-19:19 to override. :app:processDebugManifest

錯誤很清楚: 1.app中[email protected]allowBackup value=(true),但third:fw中value=(false)。 解決方案也給了建議:Suggestion: add 'tools:replace="android:allowBackup" 2.app中[email protected] value=(@style/AppTheme),但[:third:fw]value=(@style/FWAppTheme). 解決方案也給了建議:Suggestion: add 'tools:replace="android:theme" 解決方案:不好改動第三方庫fw,所以改動app。 app的manifest頭宣告tools作用域:

xmlns:tools="http://schemas.android.com/tools"
<application
......
 tools:replace="android:allowBackup,android:theme">
 </application>