Reputation: 1480
I am using a library which uses its own android:theme, and therefore I receive the following error while building: Error:(55, 9) Execution failed for task ':contacit:processDebugManifest'.
Manifest merger failed : Attribute application@theme value=(@style/Theme.MainTheme) from AndroidManifest.xml:55:9 is also present at com.github.florent37:materialviewpager:1.0.3.2:11:18 value=(@style/AppTheme) Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:49:5 to override
I've modified my app's AndroidManifest.xml as follows:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.main"
android:versionCode="19"
android:versionName="2.5" >
...
<application
android:name="com.example.application.MainApplication"
tools:replace="android:theme"
android:allowBackup="true"
android:icon="@drawable/logo_icon"
android:label="@string/app_name"
android:theme="@style/Theme.MainTheme"
>
...
However, even though I have used the tools:replace
attribute, I am still getting the same error from the Manifest merger. Any ideas why?
Upvotes: 5
Views: 3365
Reputation: 129
Remove tools:replace
and add tools:node="replace"
to application tag. It works for me.
Upvotes: 4