I am beginner to maven and finding it difficult to migrate my project from 
gradle to Maven. For Push notification code, that I have using from below 
link in gradle environment is working fine:

https://developers.google.com/cloud-messaging/android/start
But when I am trying to use it in my Maven and adding the following 
dependency to my pom.xml file. As suggested by following GITHUB link:
https://github.com/google/gcm/issues/23
Dependency :
<dependency> 
        <groupId>com.google.gcm</groupId> 
        <artifactId>gcm-server</artifactId> 
        <version>1.0.0</version> 
 </dependency>
And when I am trying to define receiver in my manifest file, I am getting 
the error.Not able to import any of the Cloud Messaging API in my code.

<receiver android:name="com.google.android.gms.gcm.GcmReceiver" 
                android:exported="true" 
                android:permission="com.google.android.c2dm.permission.SEND" 
> 
        <intent-filter> 
            <action android:name="com.google.android.c2dm.intent.RECEIVE" /> 
            <category android:name=
"gcm.play.android.samples.com.gcmquickstart" /> 
        </intent-filter> 
 </receiver>

Able to run in Gradle environment successfully but now due to some client 
requirement I need to migrate my project to Maven. And using the below 
version for GCM in my Gradle:
compile 'com.google.android.gms:play-services-gcm:8.3.0' 
compile 'com.android.support:support-v4:19.1.0'
Please help me to resolve the error.If you need any more clarification, 
please do let me know. Thanks in Advance. Thanks for the help.


-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/6b9ac5f6-e487-4758-b133-3fd491ac4921%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to