错误:清单合并失败:属性application @ appComponentFactory值

时间:2019-05-27 06:27:40

标签: android color-picker

你好朋友,我在这里使用GitHub颜色选择器库 implementation 'petrov.kristiyan:colorpicker-library:1.1.10'

库链接https://github.com/kristiyanP/colorpicker

当我尝试将此库集成到我的项目中时,出现此错误,请帮帮我吗?

  ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
        is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
        Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:8:5-35:19 to override.


here is my mainfest


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="bible.swordof.God">

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE_EXTERNAL_STORAGE" />

        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <activity android:name=".Favourite"></activity>
            <activity android:name=".ALLVERSE" />
            <activity android:name=".Verse" />
            <activity android:name=".Chapters" />
            <activity android:name=".splashsacreen">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>

            <meta-data
                android:name="com.google.android.gms.ads.APPLICATION_ID"
                android:value="ca-app-pub-3940256099942544~3347511713" />

            <activity
                android:name=".MainActivity"
                android:label="@string/app_name"
                android:theme="@style/AppTheme.NoActionBar" />
        </application>

    </manifest>

1 个答案:

答案 0 :(得分:1)

与以下迁移到AndroidX使用冲突:

implementation 'petrov.kristiyan:colorpicker-library:1.1.5'