[英]When I run my old android project I get a error message from the build.gradle
[英]Android : Getting manifest merge error when I gradle my project
錯誤:任務':app:processDebugManifest'的執行失敗。
清單合並失敗:[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)。 建議:在AndroidManifest.xml:26:9-28:38的元素上添加'tools:replace =“ android:value”'以進行覆蓋。
和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'
對所有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'
更改
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
至
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.