2

I had GCM in my App. After an update of the Android SDK Tools my App crashed. I'll get this error:

E/AndroidRuntime(24175): java.lang.NoClassDefFoundError: com.google.android.gcm.GCMRegistrar

I searched for fixes, I proceed thinks like;

  • Import .jar file manually
  • Add .jar to build path
  • etc.

Who has the fix for this? Thanks!

Rick de Jong
  • 237
  • 1
  • 4
  • 12

3 Answers3

8

I've just solved the problem with my app.

Follow below steps to resolve the problem:

  1. Right click on Project->Build Path=> Configure Build Path and then Order and Exports
  2. Now check the Android Private Libraries checkbox.
  3. Refresh ,Clean and Run..here you go!
Vinay
  • 1,859
  • 22
  • 26
0

I was having this error after updating the Android SDK tools as well, but I was able to compile and install my application from the command line. If you have Ant installed you can use the commands in your applications directory:

android update project --name NameOfYourProject -p . --target android-17

ant clean debug

ant installd

I am using Windows 7, jdk1.7, and I had just updated to Android SDK Tools 22.0.1

khr055
  • 28,690
  • 16
  • 36
  • 48
Shirtz
  • 1
0

Make sure you are exporting the library.

James McCracken
  • 15,488
  • 5
  • 54
  • 62