Android 清单合并失败错误,还有两个同步模块

Android 清单合并失败错误,还有两个同步模块,android,Android,我有一个项目,它显示了一些明显的合并失败的错误。我也尝试了很多解决方案,包括迁移到androidx,但该项目使用的一些库显示迁移到androidx时出错,因此我无法将其迁移到androidx。请提供此问题的解决方案。另外,这个项目显示了两个同步模块,为什么我不明白。我附上了我的项目错误截图 buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { cla

我有一个项目,它显示了一些明显的合并失败的错误。我也尝试了很多解决方案,包括迁移到androidx,但该项目使用的一些库显示迁移到androidx时出错,因此我无法将其迁移到androidx。请提供此问题的解决方案。另外,这个项目显示了两个同步模块,为什么我不明白。我附上了我的项目错误截图

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
}
dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}

android {
compileSdkVersion 28

defaultConfig {
    applicationId "com.appetiser.kookaborrow"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 114
    versionName "1.0.14"
    vectorDrawables.useSupportLibrary = true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android- 
optimize.txt'), 'proguard-rules.pro'
    }
    debug {
        debuggable true
    }
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation('com.mikepenz:materialdrawer:5.6.0@aar') {
    transitive = true
}
implementation('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
    transitive = true;
}
implementation('com.stripe:stripe-android:1.0.4@aar') {
    transitive = true;
}
implementation('io.fabric.sdk.android:fabric:1.3.14@aar') {
    transitive = true;
}
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.slider:library:1.1.5@aar'
implementation 'com.android.support:design:28.0.0'
implementation 'com.github.arimorty:floatingsearchview:2.0.3'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.firebase:firebase-appindexing:17.1.0'
implementation 'com.squareup:android-times-square:1.5.0@aar'
implementation 'be.billington.calendar.recurrencepicker:library:1.1.1'
implementation 'com.amazonaws:aws-android-sdk-ec2:2.3.3'
implementation 'com.amazonaws:aws-android-sdk-s3:2.3.3'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.kbeanie:multipicker:1.1.31@aar'
implementation 'com.prolificinteractive:material-calendarview:1.4.2'
implementation 'com.crystal:crystalrangeseekbar:1.1.1'
implementation 'com.thoughtbot:expandablerecyclerview:1.3'
implementation 'com.jakewharton:butterknife:10.1.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:mediarouter-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

implementation 'com.mixpanel.android:mixpanel-android:5.1.1'

testImplementation 'junit:junit:4.12'

}


您需要在
gradle.properties
文件中添加这两行

android.useAndroidX=true
android.enableJetifier=true

manifest.xml的应用程序标记中添加以下行

tools:replace="android:appComponentFactory"
请注意,您需要在
清单
文件中写入不在build/manifest.xml中

您可以尝试添加:

android:appComponentFactory="android.support.v4.app.CoreComponentFactory"

到您清单中的标签。

因此,在浪费了一天的时间之后,我终于解决了这个错误。我在问题中提到的两个错误是由两个库引起的,一个库已弃用,另一个库未更新,因此我删除了弃用的库,并减少了另一个未更新的库的版本,这解决了我的问题。这对于将项目迁移到androidx不是强制性的,这是因为可能存在某些无法转换的第三方库,这可能会导致错误。如果有这样的错误,最好先检查所有导致错误的库,然后解决它或删除它,或者尝试降级它的版本。
祝您愉快。

这将把我的项目迁移到androidx,我不想这样。没有其他方法可以使用外迁移。它显示错误清单合并失败,出现多个错误合并错误:错误:工具:替换在第22行为属性android:appComponentFactory指定的值,但没有指定新的值应用程序主清单(此文件),第21行错误:验证失败,正在退出应用程序主清单(此文件)尝试粘贴实际代码而不是屏幕截图。此错误可能是由您在此项目中使用的一个或多个依赖项引起的。这些依赖项可能正在使用androidX。您可能需要找到该库并使用它的旧版本。我不确定这件事!!检查此问题: