Android Build 异常 -android.support.VERSION 冲突

本文介绍了如何解决在Android开发中遇到的支持库版本冲突问题。提供了两种解决方案:一是通过在Build.gradle文件中指定统一的$support_version来同步依赖库版本;二是使用exclude关键字排除特定依赖,避免版本冲突。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Error:Execution failed for task ':arsenal:processDebugAndroidTestManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:support-v13:25.3.1] AndroidManifest.xml:27:9-31
    is also present at [com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at manifestMerger8754986039253803499.xml:25:5-27:34 to override.

在引用第三方的Lib的时候可能会出现Lib依赖的 android.support的版本冲突。
那么怎么解决呢?

错误提示去修改 Manifest。 搞了好久,没有成功。。。

解决方法:
直接看错误提示的冲突的版本:[com.android.support:support-v13:25.3.1]

在被引用Lib所在Module的Build.gradle 中增加:

compile "com.android.support:support-v13:$support_version"

那么 这个 $support_version 是什么呢?是Project的Build.gradle中的

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

ext.support_version = "26.0.0-alpha1"  //看这行,这行。

task clean(type: Delete) {
    delete rootProject.buildDir
}

解决方案二

    compile ('com.afollestad.material-dialogs:core:0.9.4.5') {
        exclude group: 'com.android.support' //exclude 可以解决 lib冲突的问题。
    }
releaseRuntimeClasspath - Resolved configuration for runtime for variant: release +--- androidx.appcompat:appcompat:1.6.1 | +--- androidx.activity:activity:1.6.0 -> 1.8.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.8.0 -> 1.9.0 | | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | | +--- androidx.annotation:annotation-experimental:1.3.0 | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.8.22 | | | | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 | | | | \--- org.jetbrains:annotations:13.0 | | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | | | +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | \--- com.google.guava:listenablefuture:1.0 | | | +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.6.1 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | +--- androidx.arch.core:core-common:2.2.0 | | | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | +--- androidx.arch.core:core-runtime:2.2.0 | | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | | \--- androidx.arch.core:core-common:2.2.0 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 | | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 | | | | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 | | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4 | | | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (c) | | | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 (c) | | | | | | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 (c) | | | | | | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 -> 1.8.22 | | | | | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 (*) | | | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22 | | | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 (*) | | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21 -> 1.8.22 | | | | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4 (*) | | | | | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 -> 1.8.22 (*) | | | | | +--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | | +--- androidx.profileinstaller:profileinstaller:1.3.0 | | | | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | | | | +--- androidx.concurrent:concurrent-futures:1.1.0 (*) | | | | | +--- androidx.startup:startup-runtime:1.1.1 | | | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | | | \--- androidx.tracing:tracing:1.0.0 | | | | | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | | \--- com.google.guava:listenablefuture:1.0 | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | | \--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | | +--- androidx.versionedparcelable:versionedparcelable:1.1.1 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | | | \--- androidx.core:core-ktx:1.9.0 (c) | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (*) | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | \--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | | +--- androidx.core:core-ktx:1.2.0 -> 1.9.0 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | +--- androidx.core:core:1.9.0 (*) | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.8.22 (*) | | | | \--- androidx.core:core:1.9.0 (c) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 | | | | +--- androidx.arch.core:core-common:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.arch.core:core-runtime:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (*) | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (*) | | | +--- androidx.savedstate:savedstate:1.2.1 | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | | +--- androidx.arch.core:core-common:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (*) | | | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (*) | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | \--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | +--- androidx.profileinstaller:profileinstaller:1.3.0 (*) | | +--- androidx.savedstate:savedstate:1.2.1 (*) | | +--- androidx.tracing:tracing:1.0.0 (*) | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 (*) | +--- androidx.annotation:annotation:1.3.0 | +--- androidx.appcompat:appcompat-resources:1.6.1 | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | | +--- androidx.core:core:1.6.0 -> 1.9.0 (*) | | +--- androidx.vectordrawable:vectordrawable:1.1.0 | | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | | +--- androidx.core:core:1.1.0 -> 1.9.0 (*) | | | \--- androidx.collection:collection:1.1.0 (*) | | +--- androidx.vectordrawable:vectordrawable-animated:1.1.0 | | | +--- androidx.vectordrawable:vectordrawable:1.1.0 (*) | | | +--- androidx.interpolator:interpolator:1.0.0 | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | | \--- androidx.collection:collection:1.1.0 (*) | | \--- androidx.appcompat:appcompat:1.6.1 (c) | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | +--- androidx.core:core:1.9.0 (*) | +--- androidx.core:core-ktx:1.8.0 -> 1.9.0 (*) | +--- androidx.cursoradapter:cursoradapter:1.0.0 | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | +--- androidx.drawerlayout:drawerlayout:1.0.0 -> 1.1.1 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.2.0 -> 1.9.0 (*) | | \--- androidx.customview:customview:1.1.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.3.0 -> 1.9.0 (*) | | \--- androidx.collection:collection:1.1.0 (*) | +--- androidx.emoji2:emoji2:1.2.0 | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | +--- androidx.collection:collection:1.1.0 (*) | | +--- androidx.core:core:1.3.0 -> 1.9.0 (*) | | +--- androidx.lifecycle:lifecycle-process:2.4.1 -> 2.6.1 | | | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (*) | | | +--- androidx.startup:startup-runtime:1.1.1 (*) | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-livedata:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | \--- androidx.startup:startup-runtime:1.0.0 -> 1.1.1 (*) | +--- androidx.emoji2:emoji2-views-helper:1.2.0 | | +--- androidx.collection:collection:1.1.0 (*) | | +--- androidx.core:core:1.3.0 -> 1.9.0 (*) | | \--- androidx.emoji2:emoji2:1.2.0 (*) | +--- androidx.fragment:fragment:1.3.6 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.2.0 -> 1.9.0 (*) | | +--- androidx.collection:collection:1.1.0 (*) | | +--- androidx.viewpager:viewpager:1.0.0 | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | | +--- androidx.core:core:1.0.0 -> 1.9.0 (*) | | | \--- androidx.customview:customview:1.0.0 -> 1.1.0 (*) | | +--- androidx.loader:loader:1.0.0 | | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | | +--- androidx.core:core:1.0.0 -> 1.9.0 (*) | | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.6.1 | | | | +--- androidx.arch.core:core-common:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.arch.core:core-runtime:2.1.0 -> 2.2.0 (*) | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (*) | | | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 -> 1.8.22 (*) | | | | +--- androidx.lifecycle:lifecycle-common:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-process:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-runtime:2.6.1 (c) | | | | +--- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c) | | | | \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c) | | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.6.1 (*) | | +--- androidx.activity:activity:1.2.4 -> 1.8.0 (*) | | +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1 -> 2.6.1 (*) | | +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.6.1 (*) | | +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 -> 2.6.1 (*) | | +--- androidx.savedstate:savedstate:1.1.0 -> 1.2.1 (*) | | \--- androidx.annotation:annotation-experimental:1.0.0 -> 1.3.0 (*) | +--- androidx.lifecycle:lifecycle-runtime:2.5.1 -> 2.6.1 (*) | +--- androidx.lifecycle:lifecycle-viewmodel:2.5.1 -> 2.6.1 (*) | +--- androidx.resourceinspection:resourceinspection-annotation:1.0.1 | | \--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | +--- androidx.savedstate:savedstate:1.2.0 -> 1.2.1 (*) | +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 -> 1.8.22 (*) | \--- androidx.appcompat:appcompat-resources:1.6.1 (c) +--- com.google.android.material:material:1.10.0 -> 1.11.0 | +--- org.jetbrains.kotlin:kotlin-bom:1.8.22 | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 (c) | | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 (c) | | +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22 (c) | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22 (c) | +--- com.google.errorprone:error_prone_annotations:2.15.0 | +--- androidx.activity:activity:1.8.0 (*) | +--- androidx.annotation:annotation:1.2.0 -> 1.3.0 | +--- androidx.appcompat:appcompat:1.6.1 (*) | +--- androidx.cardview:cardview:1.0.0 | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.1.0 -> 1.9.0 (*) | | +--- androidx.customview:customview:1.0.0 -> 1.1.0 (*) | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | +--- androidx.constraintlayout:constraintlayout:2.0.1 -> 2.1.4 | | +--- androidx.appcompat:appcompat:1.2.0 -> 1.6.1 (*) | | +--- androidx.core:core:1.3.2 -> 1.9.0 (*) | | \--- androidx.constraintlayout:constraintlayout-core:1.0.4 | +--- androidx.core:core:1.6.0 -> 1.9.0 (*) | +--- androidx.drawerlayout:drawerlayout:1.1.1 (*) | +--- androidx.dynamicanimation:dynamicanimation:1.0.0 | | +--- androidx.core:core:1.0.0 -> 1.9.0 (*) | | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | | \--- androidx.legacy:legacy-support-core-utils:1.0.0 | | +--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | +--- androidx.core:core:1.0.0 -> 1.9.0 (*) | | +--- androidx.documentfile:documentfile:1.0.0 | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | +--- androidx.loader:loader:1.0.0 (*) | | +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0 | | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | | \--- androidx.print:print:1.0.0 | | \--- androidx.annotation:annotation:1.0.0 -> 1.3.0 | +--- androidx.annotation:annotation-experimental:1.0.0 -> 1.3.0 (*) | +--- androidx.fragment:fragment:1.2.5 -> 1.3.6 (*) | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.6.1 (*) | +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.1.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.1.0 -> 1.9.0 (*) | | +--- androidx.customview:customview:1.0.0 -> 1.1.0 (*) | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | +--- androidx.resourceinspection:resourceinspection-annotation:1.0.1 (*) | +--- androidx.transition:transition:1.2.0 | | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | | +--- androidx.core:core:1.0.1 -> 1.9.0 (*) | | \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*) | +--- androidx.vectordrawable:vectordrawable:1.1.0 (*) | \--- androidx.viewpager2:viewpager2:1.0.0 | +--- androidx.annotation:annotation:1.1.0 -> 1.3.0 | +--- androidx.fragment:fragment:1.1.0 -> 1.3.6 (*) | +--- androidx.recyclerview:recyclerview:1.1.0 (*) | +--- androidx.core:core:1.1.0 -> 1.9.0 (*) | \--- androidx.collection:collection:1.1.0 (*) +--- com.google.android.material:material:1.11.0 (*) +--- androidx.activity:activity:1.8.0 (*) \--- androidx.constraintlayout:constraintlayout:2.1.4 (*) (c) - A dependency constraint, not a dependency. The dependency affected by the constraint occurs elsewhere in the tree. (*) - Indicates repeated occurrences of a transitive dependency subtree. Gradle expands transitive dependency subtrees only once per project; repeat occurrences only display the root of the subtree, followed by this annotation. A web-based, searchable dependency report is available by adding the --scan option. BUILD SUCCESSFUL in 20s 1 actionable task: 1 executed
06-13
Executing tasks: [:app:assembleDebug] in project D:\TestProject\MyApplication > Task :app:createDebugVariantModel UP-TO-DATE > Task :app:preBuild UP-TO-DATE > Task :app:preDebugBuild UP-TO-DATE > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE > Task :app:compileDebugAidl NO-SOURCE > Task :app:compileDebugRenderscript NO-SOURCE > Task :app:generateDebugBuildConfig UP-TO-DATE > Task :app:javaPreCompileDebug UP-TO-DATE > Task :app:checkDebugAarMetadata UP-TO-DATE AGPBI: {"kind":"warning","text":"Your project has set `android.useAndroidX=true`, but configuration `:app:debugRuntimeClasspath` still contains legacy support libraries, which may cause runtime issues.\nThis behavior will not be allowed in Android Gradle plugin 8.0.\nPlease use only AndroidX dependencies or set `android.enableJetifier=true` in the `gradle.properties` file to migrate your project to AndroidX (see https://developer.android.com/jetpack/androidx/migrate for more info).\nThe following legacy support libraries are detected:\n:app:debugRuntimeClasspath -> com.android.support:support-compat:28.0.0\n:app:debugRuntimeClasspath -> com.android.support:support-compat:28.0.0 -> com.android.support:support-annotations:28.0.0\n:app:debugRuntimeClasspath -> com.android.support:support-compat:28.0.0 -> com.android.support:collections:28.0.0\n:app:debugRuntimeClasspath -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1\n:app:debugRuntimeClasspath -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1 -> android.arch.lifecycle:common:1.1.1\n:app:debugRuntimeClasspath -> com.android.support:support-compat:28.0.0 -> android.arch.lifecycle:runtime:1.1.1 -> android.arch.core:common:1.1.1\n:app:debugRuntimeClasspath -> com.android.support:support-compat:28.0.0 -> com.android.support:versionedparcelable:28.0.0","sources":[{}]} > Task :app:generateDebugResValues UP-TO-DATE > Task :app:mapDebugSourceSetPaths UP-TO-DATE > Task :app:generateDebugResources UP-TO-DATE > Task :app:mergeDebugResources UP-TO-DATE > Task :app:packageDebugResources UP-TO-DATE > Task :app:parseDebugLocalResources UP-TO-DATE > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE > Task :app:extractDeepLinksDebug UP-TO-DATE > Task :app:processDebugMainManifest FAILED [androidx.versionedparcelable:versionedparcelable:1.1.1] C:\Users\wangsen\.gradle\caches\transforms-3\4b621581b14be943fef7e9025808a5ef\transformed\versionedparcelable-1.1.1\AndroidManifest.xml Warning: Namespace 'androidx.versionedparcelable' used in: androidx.versionedparcelable:versionedparcelable:1.1.1, com.android.support:versionedparcelable:28.0.0. D:\TestProject\MyApplication\app\src\main\AndroidManifest.xml:22:18-91 Error: 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.7.0] AndroidManifest.xml:24:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:7:5-25:19 to override. See https://developer.android.com/r/studio-ui/build/manifest-merger for more information about the manifest merger. > Task :app:mergeDebugShaders UP-TO-DATE > Task :app:compileDebugShaders NO-SOURCE > Task :app:generateDebugAssets UP-TO-DATE > Task :app:mergeDebugAssets UP-TO-DATE > Task :app:compressDebugAssets UP-TO-DATE > Task :app:processDebugJavaRes NO-SOURCE > Task :app:desugarDebugFileDependencies UP-TO-DATE > Task :app:mergeDebugJniLibFolders UP-TO-DATE > Task :app:mergeDebugNativeLibs NO-SOURCE > Task :app:stripDebugDebugSymbols NO-SOURCE > Task :app:validateSigningDebug UP-TO-DATE > Task :app:writeDebugAppMetadata UP-TO-DATE > Task :app:writeDebugSigningConfigVersions UP-TO-DATE > Task :app:checkDebugDuplicateClasses FAILED > Task :app:mergeDebugJavaResource FAILED FAILURE: Build completed with 3 failures. 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:processDebugMainManifest'. > Manifest merger failed with multiple errors, see logs * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable > Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.app.INotificationSideChannel$Stub$Proxy found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.os.IResultReceiver found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.os.IResultReceiver$Stub found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.os.IResultReceiver$Stub$Proxy found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class androidx.core.graphics.drawable.IconCompatParcelizer found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class androidx.core.internal.package-info found in modules core-1.7.0-runtime (androidx.core:core:1.7.0) and support-compat-28.0.0-runtime (com.android.support:support-compat:28.0.0) Duplicate class androidx.versionedparcelable.CustomVersionedParcelable found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.NonParcelField found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.ParcelField found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.ParcelImpl found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.ParcelImpl$1 found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.ParcelUtils found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.VersionedParcel found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.VersionedParcel$1 found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.VersionedParcel$ParcelException found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.VersionedParcelParcel found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.VersionedParcelStream found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.VersionedParcelStream$FieldBuffer found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.VersionedParcelable found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Duplicate class androidx.versionedparcelable.VersionedParcelize found in modules versionedparcelable-1.1.1-runtime (androidx.versionedparcelable:versionedparcelable:1.1.1) and versionedparcelable-28.0.0-runtime (com.android.support:versionedparcelable:28.0.0) Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>. * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. ============================================================================== 3: Task failed with an exception. ----------- * What went wrong: Execution failed for task ':app:mergeDebugJavaResource'. > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction > 2 files found with path 'META-INF/androidx.core_core.version' from inputs: - C:\Users\wangsen\.gradle\caches\transforms-3\0b22a6b07b3e498281e2fdb9d93c9c6b\transformed\support-compat-28.0.0\jars\classes.jar - C:\Users\wangsen\.gradle\caches\transforms-3\0212d0c0c0b99c5d00c15a82a811f4d1\transformed\core-1.7.0\jars\classes.jar Adding a packagingOptions block may help, please refer to https://developer.android.com/reference/tools/gradle-api/7.4/com/android/build/api/dsl/ResourcesPackagingOptions for more information * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. ============================================================================== * Get more help at https://help.gradle.org BUILD FAILED in 436ms 22 actionable tasks: 3 executed, 19 up-to-date
最新发布
07-10
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值