Android:更新至新版本的Gradle后,出现“清单合并失败”错误接受将项目更新为gradle的新版本后,出现以下错误:Error:Execution failed for task ':app:processDebugManifest'.Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.0-alpha1) from [com.android.support:cardview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 is also present at [com.android.support:design:25.3.1] AndroidManifest.xml:27:9-31 value=(25.3.1). Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:22:5-24:41 to override.我怎么解决这个问题?这是我的应用程序的build.gradle文件:android { compileSdkVersion 25 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.sample.bookReader" minSdkVersion 16 targetSdkVersion 25 versionCode 1 versionName "1.0" } ...}dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:multidex:+' compile 'com.android.support:appcompat-v7:26.0.0-alpha1' compile 'com.android.support:cardview-v7:26.0.0-alpha1' compile 'com.android.support:design:25+' compile 'com.jakewharton:butterknife:8.2.1' apt 'com.jakewharton:butterknife-compiler:8.2.1' ...}这是项目的build.gradle:buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.1' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' }}allprojects { repositories { jcenter() maven { url "https://www.jitpack.io" } }}task clean(type: Delete) { delete rootProject.buildDir}我如何解决此错误,同时保持通过更新gradle版本所做的更改?
4 回答
- 4 回答
- 0 关注
- 640 浏览
添加回答
举报
0/150
提交
取消