我正在尝试按照本教程
我完成了所有事情后,清单中的错误
Error:(8, 5) uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library C:\Users\Zezo2\AndroidStudioProjects\AndroidPushNotificationsUsingGCM1\app\build \intermediates\exploded-aar\com.google.android.gms\play- services\6.5.87\AndroidManifest.xml
Error:(8, 5) Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library C:\Users\Zezo2\AndroidStudioProjects\AndroidPushNotificationsUsingGCM1\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\6.5.87\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms" to force usage
这是我的build.geadle
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:8'
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.androidhive.pushnotifications"
minSdkVersion 8
targetSdkVersion 16
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile 'com.google.android.gms:play-services:+'
}
答案 0 :(得分:4)
基本上,您使用的库具有您需要的最低SDK版本..
uses-sdk:minSdkVersion 8 cannot be smaller than version 9
您需要编辑Android项目以更新minSdkVersion