Zezo Ahmed
Zezo Ahmed

Reputation: 113

Error:(8, 5) uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library

hi am trying to follow this tutorial

Link

after i done everything am getting error in the manifest

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

this is my 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:+'

}

Upvotes: 2

Views: 4719

Answers (1)

Kurdish Droid
Kurdish Droid

Reputation: 279

Basically the library you are using has a minimum SDK version you need to adher too..

uses-sdk:minSdkVersion 8 cannot be smaller than version 9

you need to edit your Android project to update your minSdkVersion

  • Update src/build.gradle - Make sure is the one under src folder
  • Sync gradle button
  • Rebuild project
  • After updating the build.gradle minSdkVersion, you have to click on the button to sync gradle file ("Sync Project with Gradle files").

Upvotes: 4

Related Questions