当前位置: 首页 > 知识库问答 >
问题:

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

田翰林
2023-03-14

我在编译时遇到以下错误。

清单合并失败:来自 [android.android.support:28.0.0] AndroidManifest.xml:22:18-91 的属性application@appComponentFactory值=(android.support.v4.app.核心组件工厂)也出现在 [androidx.core:1.0.0] AndroidManifest.xml:22:18-86 值=(androidx.core.app.核心组件工厂)。建议:将“工具:替换=”机器人:应用程序组件工厂“添加到Android智能的元素中.xml:5:5-27:19以覆盖。

任何人都可以帮我解决它。

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//additional android libs
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
// third-party libs
implementation 'com.jakewharton:butterknife:10.1.0' // butter-knife
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0' // butter-knife
implementation 'com.stepstone.stepper:material-stepper:4.3.1' // registration stepper
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example">

    <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=".RegisterTravelerActivity"></activity>
        <activity
            android:name=".LoginActivity"
            android:theme="@style/AuthTheme" />
        <activity
            android:name=".SplashActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name"
            android:theme="@style/SplashScreenTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>

共有1个答案

万俟小林
2023-03-14

我面临着同样的问题,你必须检查所有第三方lib版本一个在他们身上是否正在使用android x lib。找到该库并减少库版本

另一种方法是您必须将appcompat lib和其他lib更新到android x lib

 类似资料:
  • 我试着建立我的应用程序,但它错误的像这样 清单合并失败:[com.android.support:support-compat:28.0.0]AndroidManifest.xml:22:18-91中的属性application@AppComponentFactory value=(Android.support.v4.app.CoreComponentFactory)也出现在[AndroidX.

  • 我将遵循以下教程:https://www.youtube.com/watch?v=xtElLuzjA0U 我使用Android Studio 3.2.1-每当我实现实现'me.zhanghai.android.materialprogressbar:库:1.6.1'我得到这个错误: 当我第一次编写本教程时,所有内容都已编译,我能够获得进度条,但当我尝试调试和构建时,它崩溃了。现在,我的第二次,实现

  • 所有这些都很好,但我正在尝试添加这个库https://github.com/wdullaer/MaterialDateTimePicker 突然,当我同步我的分级时,它给了我这个错误 即使我把这个建议加在我的清单上 我无法完成它,因为现在我得到了这个错误 编辑-解决方案:感谢所有的btw,所以降级库是可以的,但它给了我这个错误 关于不同版本支持的错误(由于我的级别,不能直接放,抱歉) 然后我做了一

  • 清单合并失败:来自AndroidManifest.xml:11:9-40的属性application@theme value=(@style/apptheme)也出现在[com.github.todd-davies:ProgressWheel:1.2]AndroidManifest.xml:13:9-56value=(@android:style/theme.notitlebar)中。建议:将't

  • 当我使用构建Gradle时,我得到以下错误。请帮我解决这个问题。 错误消息:清单合并失败:[com.android.support:support-compat:28.0.0]AndroidManifest.xml:22:18-91中的属性application@AppComponentFactory value=(Android.support.v4.app.CoreComponentFacto

  • 我似乎得到了这样的错误: