我收到以下错误:
* What went wrong:
Execution failed for task ':Application:processReleaseManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 20 declared in library com.google.android.support:wearable:1.0.0
这是我的Application Build.gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
defaultConfig {
applicationId "com.ysk.notes"
minSdkVersion 9
targetSdkVersion 20
versionCode 3
versionName "1.02"
}
buildTypes {
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies
{
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':FacebookSDK')
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/mail.jar')
compile 'com.android.support:support-v4:20.+'
compile 'com.google.android.support:wearable:+'
compile 'com.google.android.gms:play-services-wearable:+'
wearApp project(':Wearable')
}
我不确定我哪里出错了?我有一个类似的问题支持-v4:+我改为v4:20。+ - 现在错误消失了,我收到了上述错误。
答案 0 :(得分:2)
穿戴模块必须
minSdkVersion 20
穿戴模块和com.google.android.support:wearable:1.0.0'要求minSdk = 20 然后改变你的构建脚本。
defaultConfig {
applicationId "com.ysk.notes"
minSdkVersion 20
targetSdkVersion 20
versionCode 3
versionName "1.02"
}
移动模块不需要com.google.android.support:wearable:1.0.0'依赖性。强>
关于support-v4:
compile 'com.android.support:support-v4:+'
compile 'com.android.support:support-v4:20.+'
他们是不同的。
compile 'com.android.support:support-v4:+' -> last version in your sdk, in this moment it can be 21.
compile 'com.android.support:support-v4:20.+' -> last version with maior release 20 (then 20.xx )