Rick de Jong
Rick de Jong

Reputation: 237

java.lang.NoClassDefFoundError: com.google.android.gcm.GCMRegistrar

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;

Who has the fix for this? Thanks!

Upvotes: 2

Views: 5669

Answers (3)

Vinay
Vinay

Reputation: 1899

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!

Upvotes: 8

James McCracken
James McCracken

Reputation: 15766

Make sure you are exporting the library.

Upvotes: 0

Shirtz
Shirtz

Reputation: 1

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

Upvotes: 0

Related Questions