【问题标题】:Manifest Merger Failed between the conflict of version版本冲突之间的清单合并失败
【发布时间】:2018-04-12 09:36:43
【问题描述】:

错误

错误:任务执行失败 ':chat-sdk-firebase-ui:processDebugAndroidTestManifest'。显现 合并失败:属性元数据#android.support.VERSION@value 来自 [com.android.support:support-v13:26.0.2] 的值 =(26.0.2) AndroidManifest.xml:28:13-35 也出现在 [com.android.support:design:26.1.0] AndroidManifest.xml:28:13-35 价值=(26.1.0)。建议:添加 'tools:replace="android:value"' 到 元素在 manifestMerger5400804966500911997.xml:26:9-28:38 覆盖。

build.gradle 文件是

android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
    applicationId "com.example.bhatti.chatsdk"
    minSdkVersion 16
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
 }
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.2'

compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-annotations:26.0.0-alpha1'
}
 apply plugin: 'com.google.gms.google-services'

build.gradle 文件(chatApp)

buildscript {
repositories {
    mavenCentral()
    maven { url "https://jitpack.io" }
    jcenter()
}
dependencies{

    classpath 'com.android.tools.build:gradle:2.3.3'
    classpath 'com.google.gms:google-services:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

 allprojects {
repositories {
    mavenCentral()
    maven { url "https://jitpack.io" }
    jcenter()
    maven { url "https://maven.google.com" }
}
}

gradle.properties 文件是

MIN_SDK = 16
ANDROID_BUILD_TARGET_SDK_VERSION = 26
ANDROID_COMPILE_SDK_VERSION = 26
ANDROID_BUILD_TOOLS_VERSION = 26.0.2
GOOGLE_SERVICES_VERSION = 11.0.4
ANDROID_SUPPORT_VERSION = 26.0.2

Manifest.xml 文件

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

<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=".MainActivity">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

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

【问题讨论】:

  • 你检查我的答案了吗
  • 是的,我已经检查过了,但对我没有用

标签: android android-layout android-studio


【解决方案1】:

使用

compile 'com.android.support:support-annotations:26.0.2'

代替

compile 'com.android.support:support-annotations:26.0.0-alpha1'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-12
    • 2019-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多