一個Android工程依賴了一個有 AndroidManifest.xml出現的錯誤
阿新 • • 發佈:2019-01-10
出現的錯誤如下:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute [email protected] value=(@style/AppTheme) from AndroidManifest.xml:10:9-40
is also present at [Call:calllibrary:unspecified] AndroidManifest.xml:17:9-65 value=(@style/Theme.AppCompat.Light.NoActionBar).
Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:5:5-18:19 to override.
解決辦法:
在主專案的application節點新增
tools:replace="android:icon",然後會提示導一句話tag:xmlns:tools="http://schemas.Android.com/tools"
,重新編譯一下就可以了
位置如下:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.hzjiteng.call"> tag:xmlns:tools="http://schemas.Android.com/tools"