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?
Try adding the following labels to resolve the issue: Add the xmlns:tools line in the manifest tag. Add tools:replace= or tools:ignore= in the application tag.
Inspect the merged manifest and find conflicts Even before you build your app, you can see a preview of what your merged manifest looks by opening your AndroidManifest. xml file in Android Studio, and then clicking the Merged Manifest tab at the bottom of the editor.
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.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With