Reputation: 2483
I am trying to use this ProgressWheel librery, but I am facing this error after run the proyect.
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute application@theme value=(@style/AppTheme) from AndroidManifest.xml:11:9-40 is also present at [com.github.Todd-Davies:ProgressWheel:1.2] AndroidManifest.xml:13:9-56 value=(@android:style/Theme.NoTitleBar). Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:5:5-23:19 to override.
This is my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.anda.soft.apppresentation">
<application
android:name=".di.App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ui.activities.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="xxxxxxxxxxxxxxx"
/>
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
and my style.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
Any idea about how to solve it?
Upvotes: 12
Views: 15093
Reputation: 210
https://github.com/sawankumarbundelkhandi/edge_detection/issues/12#issuecomment-669854455
After a lot of searching, I found this solution working, actually, he did the same as the other told to add
Add these two lines android:theme="@style/AppTheme"
and tools:replace="android:theme"
to the application
tag
Also, add this line xmlns:tools="http://schemas.android.com/tools"
to the root manifest tag too
Here is the full code
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.doitcare.app"
xmlns:tools="http://schemas.android.com/tools">
<application
tools:replace="android:theme"
android:theme="@style/AppTheme"
...>
<activity
...
</activity>
</application>
</manifest>
Upvotes: 9
Reputation: 1007474
Any idea about how to solve it?
Follow the instructions that were given to you in the error message:
Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:5:5-23:19 to override.
In other words, add tools:replace="android:theme"
to your <application>
element.
Or, switch to a different library.
Upvotes: 26