I want to use GCM on API level 2.2 but the Android Studio is giving Error that
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library D:\New folder\AndroidStudioProjects\GCMExample\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\8.3.0\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.google.android.gms.all" to force usage
I know that changing my compiledSdkVersion to 9 will solve the error but i want to support API level 2.2 on my App
I read this Google Link
https://developers.google.com/cloud-messaging/android/client
It says that :
GCM requires devices running Android 2.2 or higher that also have the Google Play Store application installed, or an emulator running Android 2.2 with Google APIs.
my build.gradle file :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.hogo.gcmapp"
minSdkVersion 8
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
}
So, Why I am not able to use GCM on API level 2.2 ?
What I am doing wrong ?
Thanks in Advance...