Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCMRegistrar cannot be resolved

Tags:

android

import

I'm trying to implement Push Notification. I have a problem with import com.google.android.gcm.GCMRegistrar it cannot be resolved.

I did install Google Play Services and add google-play-services_lib to my projects folder.

But the problem remains. I tried to find gcm.jar as I saw solutions that worked for others, but I don't have this .jar.

Is there something else that I'm missing?

like image 686
5er Avatar asked Dec 02 '22 20:12

5er


1 Answers

First of all download Google Cloud Messaging for Android Library. For this goto Android SDK Manager->Extras->Google Cloud Messaging for Android Library check and install it.

See the below image: enter image description here

Now, after downloading this libary you'll see gcm folder is available into path D:\.....\android-sdk\extras\google

Now You'll find gcm.jar into path D:\....\android-sdk\extras\google\gcm\samples\gcm-demo-client\libs.

Now, add this gcm.jar file into your project

like image 74
M D Avatar answered Dec 10 '22 11:12

M D