Luc*_*sNa 3 android android-support-library android-studio android-gradle-plugin android-recyclerview
添加CardView和RecyclerView依赖项后,我收到编译错误,我已检查过每个帖子,但似乎没有人解决这种情况.
错误:
错误:任务':app:processDebugManifest'的执行失败.清单合并失败:来自[com.android.support:appcompat-v7:25.3.1]的属性meta-data#android.support.VERSION@value value =(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"'来覆盖.
我的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'
}
Run Code Online (Sandbox Code Playgroud)
感谢大家的回答.
您需要使用相同的Android支持库版本.您需要使用支持库26.0.0-alpha1版本.所以改变以下内容:
compile 'com.android.support:appcompat-v7:25.3.1'
Run Code Online (Sandbox Code Playgroud)
至
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
Run Code Online (Sandbox Code Playgroud)
你也需要改变compileSdkVersion和targetSdkVersion到版本26.
| 归档时间: |
|
| 查看次数: |
20254 次 |
| 最近记录: |