任务执行失败:app:processDebugManifest Android Studio 2.3.3 [英] Execution failed for task :app:processDebugManifest Android Studio 2.3.3
问题描述
在添加 CardView 和 RecyclerView 依赖项后,我收到一个编译错误,我检查了所有帖子,但似乎没有人解决这个问题.
I'm getting a compile error after adding CardView and RecyclerView dependencies, I've checked every post but no one seems to solve this case.
错误:
错误:任务:app:processDebugManifest"的执行失败.清单合并失败:属性 meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31也存在于 [com.android.support:cardview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1).建议:在AndroidManifest.xml:25:5-27:34的元素中添加'tools:replace="android:value"'来覆盖.
Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31 is also present at [com.android.support:cardview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.
我的 Build.Gradle:
My Build.Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.soft.kukito.cardviewprueba"
minSdkVersion 21
targetSdkVersion 25
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:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
}
感谢大家的回答.
推荐答案
您需要使用相同的android支持库版本.您需要使用支持库 26.0.0-alpha1
版本.所以更改以下内容:
You need to use the same android support library version. You need to use support library 26.0.0-alpha1
version. So change the following:
compile 'com.android.support:appcompat-v7:25.3.1'
到
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
您还需要将 compileSdkVersion
和 targetSdkVersion
更改为版本 26.
You also need to change the compileSdkVersion
and targetSdkVersion
to version 26.
这篇关于任务执行失败:app:processDebugManifest Android Studio 2.3.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!