I am trying to register a device onto GCM using the following code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceSta
Just go to project properties -> java build path -> "order and export " now giv a tick on the jar file "GCM.jar" that you have added
In the updated ADT(Above ADT 17) you have to put jar files inside libs folder and not lib. So make sure that you put gcm.jar file inside libs and not lib folder.
Me also got same problem, after adding android-support-v4.jar and gcm.jar into my libs folder no issues found its work like a charm
Thanks
Hello You are using old GCM implementations use new implementations available on https://developers.google.com/cloud-messaging/android/start
Make sure that the gcm jar file is in the right libs folder and added into the java build path at your project properties.
My gcm.jar was already in libs, so it wasn't a folder naming issue for me..
I had to go to Right Click > Build Path > Configure Build path... for the project in question and I removed the following:
Android Private LibrariesYou might get a lot of "errors" in your project so restart Eclipse and let it clean. Once it cleans you'll have no errors. Run your project and viola.
Thanks to DLew for this answer.