[英]Android : Getting manifest merge error when I gradle my project
Error:Execution failed for task ':app:processDebugManifest'. 错误:任务':app:processDebugManifest'的执行失败。
Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from [com.android.support:design:26.0.1] AndroidManifest.xml:28:13-35 is also present at [com.android.support:recyclerview-v7:26.1.0] AndroidManifest.xml:25:13-35 value=(26.1.0). 清单合并失败:[com.android.support:design:26.0.1]中的属性meta-data#android.support.VERSION@value value =(26.0.1)来自AndroidManifest.xml:28:13-35 [com.android.support:recyclerview-v7:26.1.0] AndroidManifest.xml:25:13-35 value =(26.1.0)。 Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override. 建议:在AndroidManifest.xml:26:9-28:38的元素上添加'tools:replace =“ android:value”'以进行覆盖。
and build.gradle file is 和build.gradle文件是
android { compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.bhatti.testapplication"
minSdkVersion 14
targetSdkVersion 26
multiDexEnabled = true
jackOptions {
enabled true}
...}
....} compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}}
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 project(':chat-sdk-ui')
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:recyclerview-v7:26.+'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services:10.2.6'
}
apply plugin: 'com.google.gms.google-services'
Use same SDK version for all the dependencies
对所有dependencies
使用相同的SDK版本
android { compileSdkVersion 27
defaultConfig {
applicationId "com.example.bhatti.testapplication"
minSdkVersion 15
targetSdkVersion 27
multiDexEnabled = true
jackOptions {
enabled true}
...}
....} compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation project(':chat-sdk-ui')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:recyclerview-v7:27.1.0'
testCompile 'junit:junit:4.12'
implementation 'com.google.android.gms:play-services:12.0.1'
}
apply plugin: 'com.google.gms.google-services'
change 更改
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
to 至
com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.