Thanks Diego for all your help. I would be thankful if you can tell me another way around how can I add that GCM dependency to my project in order to build it through Maven.
I have tried to copy Google Play Services Jar file from following path:
C:\Users\rj\AppData\Local\Android\sdk\extras\google\google_play_services\libproject\google-play-services_lib\libs
And adding the Jar in lib folder and in pom.xml file adding local dependency like this:
<dependency>
<groupId>google-play-services</groupId>
<artifactId>google-play-services</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/google-play-services.jar</systemPath>
</dependency>
This things remove my all imports error related to GCM API. But while installing app in my device I am getting the following error and app crash at launch itself:
java.lang.NoSuchMethodError: No virtual method getNoBackupFilesDir(Landroid/content/Context;)Ljava/io/File; in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/app/com.att.safe-1/base.apk)
at com.google.android.gms.iid.zzd.zzeb(Unknown Source)
at com.google.android.gms.iid.zzd.<init>(Unknown Source)
at com.google.android.gms.iid.zzd.<init>(Unknown Source)
at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
at com.att.safe.gcm.RegistrationIntentService.onHandleIntent(RegistrationIntentService.java:55)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
Content of My pom.xml file is attached for your reference.
I am requesting you to please resolve my error as I need to migrate my Android project from Gradle build system to Maven Environment in order to build it through Jenkins(Client Requirement).I have tried to search it but could not find out working solution for my problem.
Thanks For any help.