清单合并失败:属性应用程序@ theme

JoC*_*uTo 3 android android-manifest android-styles

我正在尝试使用这个ProgressWheel librery,但是在运行proyect后我遇到了这个错误.

错误:任务':app:processDebugManifest'的执行失败.

清单合并失败:来自AndroidManifest.xml的属性应用程序@ theme value =(@ style/AppTheme):11:9-40也出现在[com.github.Todd-Davies:ProgressWheel:1.2] AndroidManifest.xml:13:9 -56 value =(@ android:style/Theme.NoTitleBar).建议:在AndroidManifest.xml:5:5-23:19中添加'tools:replace ="android:theme"'元素以覆盖.

这是我的表现

<?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>
Run Code Online (Sandbox Code Playgroud)

和我的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>
Run Code Online (Sandbox Code Playgroud)

有关如何解决它的任何想法?

Com*_*are 10

有关如何解决它的任何想法?

按照错误消息中给出的说明进行操作:

建议:在AndroidManifest.xml:5:5-23:19中添加'tools:replace ="android:theme"'元素以覆盖.

换句话说,添加tools:replace="android:theme"到您的<application>元素.

或者,切换到其他库.


usa*_*a n 5

https://github.com/sawankumarbundelkhandi/edge_detection/issues/12#issuecomment-669854455

经过大量搜索,我发现这个解决方案有效,实际上,他和其他人告诉添加的一样

将这两行android:theme="@style/AppTheme"和添加tools:replace="android:theme"application标签

此外,将此行也添加xmlns:tools="http://schemas.android.com/tools"到根清单标签

这是完整的代码


<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>

Run Code Online (Sandbox Code Playgroud)