Luca Vitucci
Luca Vitucci

Reputation: 3734

NoClassDefFoundError with GoogleCloudMessaging

I'm getting this error:

java.lang.NoClassDefFoundError: com.google.android.gms.gcm.GoogleCloudMessaging

In my IntentService called from a Gcm Broadcast Receiver created following this guide: http://developer.android.com/google/gcm/client.html

I'm including play-services as dependence in Gradle.

dependencies {
    ....
    compile 'com.google.android.gms:play-services:3.1.+'
}

What could cause this issue?

EDIT: I'm using a real phone, Android JellyBean 4.1

Upvotes: 0

Views: 894

Answers (1)

Luca Vitucci
Luca Vitucci

Reputation: 3734

I've solved using those steps:

  • Sync with Gradle
  • Rebuild Project
  • Generate APK and Run again.

Upvotes: 2

Related Questions