繁体   English   中英

项目中的清单合并失败问题

[英]Manifest Merger Failed issue in the project

以下是在输出控制台中弹出的错误。 总是弹出新错误。 打开任何类文件时,R上都会出现错误。无法解析符号R。请帮帮我。

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-alpha3] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:7:5-74:19 to override.

遵循app:Gradle项目app:Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "com.example.lenovo.skanda"
        minSdkVersion 18
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    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 "androidx.constraintlayout:constraintlayout:2.0.0-alpha1"
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'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.github.msayan:tutorial-view:v1.0.6'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.bignerdranch.android:expandablerecyclerview:1.0.3'
implementation 'com.firebaseui:firebase-ui-database:0.4.0'
implementation 'com.google.firebase:firebase-storage:16.0.4'

implementation 'com.google.firebase:firebase-auth:16.0.2'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.firebaseui:firebase-ui-auth:4.2.1'

implementation 'com.squareup.picasso:picasso:2.71828'

implementation 'com.github.bumptech.glide:glide:4.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'

implementation 'com.squareup.okhttp3:okhttp:3.4.1'
implementation 'org.greenrobot:eventbus:3.0.0'
//Library for Expendable Text View
implementation 'com.ms-square:expandableTextView:0.1.4'
implementation 'me.biubiubiu.justifytext:library:1.1'

implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.airbnb.android:lottie:2.0.0'


implementation 'com.android.support:design:28.0.0'


}

apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true

非常感谢您的时间和协助。

这是因为您的以下依赖项:

implementation "androidx.constraintlayout:constraintlayout:2.0.0-alpha1"

与以下内容发生冲突:

implementation 'com.android.support:appcompat-v7:28.0.0'

因为它们都具有相同的属性:

属性application @ appComponentFactory


您可以通过使用ConstraintLayout的支持版本来解决此问题:

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

或使用AndroidX库更改所有支持库。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM