I'm trying to implement GCM push notifications on my android app and I'm following the guide here https://developers.google.com/cloud-messaging/android/client to the best of my understanding but I'm getting the error in Android Studio saying "can't resolve symbol: GcmReceiver"
I've literally just copy pasted what it says in the guide to my manifest and installed Google Play Services through the SDK Manager but it's still telling me it can't resolve it.
My understanding is that this a class that should be located in the classpath somewhere now that I've added the library considering all of the other classes like "MyGcmListenerService" have a custom package whereas it has a static one. Nowhere I've looked is helpful on this issue, can anyone please tell me what I'm doing wrong?
My code (literally just copy pasted from the example):
<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>
Check if you added the dependency to your app's level gradle script.
dependencies { compile "com.google.android.gms:play-services:7.5.+" }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With