Test Iitbbs
Test Iitbbs

Reputation: 35

Not able to compile apk with GCM

I am creating an app which requires me send push notification to my users... I am using the example from the below link:
http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

The error I am getting is

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library C:\Users\VLSI-9\Desktop\Android\AndroidPushNotificationsUsingGCM\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\7.5.0\AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="com.google.android.gms.all" to force usage

here is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 'Google Inc.:Google APIs:8'
    buildToolsVersion "22.0.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:+'
}

I have installed all extras.

Upvotes: 0

Views: 313

Answers (2)

Proxytype
Proxytype

Reputation: 722

open the manifest of the Google-play-service and check if the minimum SDK is 9, if it's try to downgrade it by change to 8 and rebuild it, if it's not success change the minimum SDK of your application to 9 and rebuild it.

Upvotes: 0

Neal Ahluvalia
Neal Ahluvalia

Reputation: 1548

Go to your build.gradle and change your app's minSdkVersion to 9

Upvotes: 1

Related Questions