NoClassDefFoundError on GCMRegistrationService

Comments

7 comments

  • Avatar
    Andrey

    Hello!

    • Is your app native or cross-platform?
    • Are you using the latest SDK/plugin?
    • Have you followed the guide carefully?
    • Does the issue reproduce with our sample app? (see the link in the integration guide for your platform)
  • Avatar
    Max Konev

    Make sure you have included Google Play Services library.

    http://docs.pushwoosh.com/docs/native-android-sdk

    6.1 Add Google Play Services library as outlined in Android Documentation: https://developers.google.com/android/guides/setup

    6.2 Add Android Support Library V4 (android-support-v4.jar) as outlined here: https://developer.android.com/tools/support-library/setup.html

  • Avatar
    Pushpendra Kumar

    I was try to integrate in Cordova Phonegap and follow this link

    http://pushwoosh.readme.io/docs/cordova-phonegap but i am getting following error

    E/AndroidRuntime(6910): FATAL EXCEPTION: IntentService[com.pushwoosh.GCMRegistrationService] E/AndroidRuntime(6910): Process: com.inspark.www, PID: 6910

    E/AndroidRuntime(6910): java.lang.NoClassDefFoundError: com.google.android.gms.iid.InstanceID

    E/AndroidRuntime(6910): at com.pushwoosh.GCMRegistrationService.register(Unknown Source)

    E/AndroidRuntime(6910): at com.pushwoosh.GCMRegistrationService.onHandleIntent(Unknown Source)

    E/AndroidRuntime(6910): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)

    E/AndroidRuntime(6910): at android.os.Handler.dispatchMessage(Handler.java:102)

    E/AndroidRuntime(6910): at android.os.Looper.loop(Looper.java:136)

    E/AndroidRuntime(6910): at android.os.HandlerThread.run(HandlerThread.java:61)

    D/CordovaActivity(6910): Paused the activity.

    i have integrated in IOS and working fine. Please help me to solve this error.

  • Avatar
    James Douglas

    Exactly the same error i'm getting, i'm at a loss as to what's causing it too. Works fine on iOS

    Using phonegap build for android, works fine native in iOS

    FATAL EXCEPTION: IntentService[com.pushwoosh.GCMRegistrationService] Process: com.nethappy, PID: 11818 java.lang.NoSuchMethodError: No virtual method getNoBackupFilesDir(Landroid/content/Context;)Ljava/io/File; in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/app/com.nethappy-1/base.apk) at com.google.android.gms.iid.zzd.zzdp(Unknown Source) at com.google.android.gms.iid.zzd.<init>(Unknown Source) at com.google.android.gms.iid.zzd.<init>(Unknown Source) at com.google.android.gms.iid.InstanceID.zza(Unknown Source) at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source) at com.pushwoosh.GCMRegistrationService.register(Unknown Source) at com.pushwoosh.GCMRegistrationService.onHandleIntent(Unknown Source) at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.os.HandlerThread.run(HandlerThread.java:61)

  • Avatar
    James Douglas

    right: solved my issue. I had a dead plugin, specifically push.plugin that was causing everything to die. Turns out I didn't need it anyway, but that's what was causing my crashes.

  • Avatar
    Emre Dagli

    Hello, I installed 4.2.0 "Pushwoosh" plugin I get

    02-13 01:32:10.909: E/AndroidRuntime(31754): FATAL EXCEPTION: IntentService[GCMRegistrationService]
    02-13 01:32:10.909: E/AndroidRuntime(31754): Process: com.alixo.ozelders.mobile, PID: 31754
    02-13 01:32:10.909: E/AndroidRuntime(31754): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/iid/InstanceID;
    02-13 01:32:10.909: E/AndroidRuntime(31754):    at com.pushwoosh.GCMRegistrationService.register(Unknown Source)
    02-13 01:32:10.909: E/AndroidRuntime(31754):    at com.pushwoosh.GCMRegistrationService.onHandleIntent(Unknown Source)
    ...
    

    Error on after lunching android application on my device.

    But before that I had a problem on:

    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
    

    I read as a solution of copying "res/values/version.xml" file "android-sdks/extras/google/google_play_services/libproject/google-play-services_lib" project. So I did that step. In version.xml file:

    <integer name="google_play_services_version">8487000</integer>
    

    Thanks for your help.

  • Avatar
    Emre Dagli

    "I mean I am using pushwoosh cordova plugin"

Please sign in to leave a comment.