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

天使R

因此,所有的好,但我想添加这个库https://github.com/wdullaer/MaterialDateTimePicker

implementation 'com.wdullaer:materialdatetimepicker:4.0.1'

当我同步我的Graddle时,突然出现了这个错误

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:10:5-53:19 to override.

即使我在清单中添加了该建议

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

<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"
    tools:replace="android:appComponentFactory"> // HERE
    <activity...

我无法完成它,因为现在我收到此错误

Manifest merger failed with multiple errors, see logs

这是我的完整清单

apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.itt.ceatm"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
    android.defaultConfig.vectorDrawables.useSupportLibrary = true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
 }
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'com.mikhaellopez:circularimageview:3.2.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'com.github.ganfra:material-spinner:2.0.0'

implementation 'com.wdullaer:materialdatetimepicker:4.0.1' //NEW LIBRARY

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

有什么建议吗?我已经进行了研究,试图围绕包括configureall和其他模块的代码进行工作,但没有成功。我卡住了

甚至对带有材料设计的DatePicker库的另一个推荐也将不胜感激

编辑-解决方案:感谢所有顺便说一句,降级的库是可以的,但随后它给了我这个错误

有关不同版本支持的错误(由于级别原因,我无法直接将其放置,抱歉)

然后我进行了研究并添加了这两个新的实现

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-vector-drawable:28.0.0'

implementation 'com.android.support:support-v13:28.0.0' //THIS
implementation 'com.android.support:support-media-compat:28.0.0' //AND THIS

implementation 'com.mikhaellopez:circularimageview:3.2.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'com.github.ganfra:material-spinner:2.0.0'

implementation "com.wdullaer:materialdatetimepicker:3.6.4"

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

然后我可以无错误地使用该库

再次感谢所有人!

马丁·齐特勒

日期选择器具有androidx依赖性。降级到版本3.6.4将使其android.support再次依赖-或升级您的应用程序以使用androidx问题543

// https://mvnrepository.com/artifact/com.wdullaer/materialdatetimepicker
implementation "com.wdullaer:materialdatetimepicker:3.6.4"

^这是解决冲突依赖关系的最简单方法。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

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

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

清单合并失败:添加Exoplayer 2.10.5后,属性application @ appComponentFactory

清单合并失败:属性 application@appComponentFactory Google Play 服务

清单合并失败:属性application @ appComponentFactory-Androidx

清单合并失败:属性application @ appComponentFactory ... Android Studio 3.2

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

清单合并失败:属性应用@ appComponentFactory更新火力地堡库

React Native Android构建错误:清单合并失败:属性application @ appComponentFactory

清单合并失败:属性application @ appComponentFactory(android.support.v4.app.CoreComponentFactory)

清单合并失败:属性应用@ appComponentFactory并不能解决这个

清单合并失败:属性application @ theme

关于appComponentFactory的AndroidX构建在发布模式下失败

错误:来自[androidx.core:core:1.0.0]的属性application @ appComponentFactory value =(androidx.core.app.CoreComponentFactory)

React Native-在包'android'中找不到属性'appComponentFactory'的资源标识符

工具:替换在第11行为属性android:appComponentFactory指定的属性,但未为应用主清单(此文件)的第10行指定新值

错误:(19)尝试安装ADMOB时,在包“ android”中找不到属性“ appComponentFactory”的资源标识符

工具:replace="android:appComponentFactory 错误

清单合并失败

清单合并失败错误

Android清单合并失败

清单合并失败。

清单合并失败1

清单合并失败,错误的编译

清单合并失败:Android Studio

如何修复清单合并失败

清单合并失败错误,构建失败

自定义 AppComponentFactory 无法实例化应用程序

Android Gradle中的清单合并失败错误