7

Im using PushBots to manage my push notifications for my app, I have been using this amazing platform for lots of apps and its the first time I have a problem like this.

Sometimes, when I launch the app, I get this error, but always when receiving a push (within or whitout the app opened).

07-12 01:20:00.844: E/AndroidRuntime(12140): FATAL EXCEPTION: IntentService[GCMIntentService-326*****5*9-1]
07-12 01:20:00.844: E/AndroidRuntime(12140): Process: com.karlol.mo***, PID: 12140
07-12 01:20:00.844: E/AndroidRuntime(12140): java.lang.NoClassDefFoundError: android.support.v4.app.NotificationManagerCompat

> //This is just the beginning of the log, there's more with some
> Pushbots handler info and stuff.... Let me know if I need to post it,
> its a lot.

Im pretty sure this is about the android support v4, this is my current build path:

Build Path

*Sometimes when I uncheck the Private Libraries clean and re-check this option again the app works (but not lucky with notifications).

The support v4 jar is in the libs folder, the route is the correct (MyApp/libs)

Im about to release an update, my app is already working/running with pushbots servers (with registered devices and all) so I would like to solve this to release my update. Thanks.

Karlo A. López
  • 2,548
  • 3
  • 29
  • 56

2 Answers2

1

As explained in these questions: NotificationManagerCompat Can't be resolved - Android Wear and Android studio unable to import WearableExtender NotificationManagerCompat and RemoteInput. It seems that you are not using the last version of the compatibility support library. You have two options to solve that:

  1. Download the newest libraries manually, and add them to your project.
  2. It seems that you are using eclipse, I recommend that you now use Android Studio so you can add the dependency and let gladle handle the libraries, like this

    dependencies {
        compile 'com.android.support:support-v4:20.0+'
    }
    
Community
  • 1
  • 1
gusridd
  • 864
  • 10
  • 16
  • Sorry Im using eclipse, I have downloaded the newest libraries (android support v4 jar) and nothing changed – Karlo A. López Jul 21 '15 at 00:26
  • Some years ago, I also used eclipse for some android projects, and I ran into the same problems for no explainable reason at that time. The good thing about Android Studio, is that integrates gradle so you don't have exactly this type of problems. – gusridd Jul 23 '15 at 00:12
  • I entered by mistake the intro key. Have you tried cleaning the project with Project > Clean? – gusridd Jul 23 '15 at 00:13
  • I have tried everithing in the world haha, how can I exactly check the v4 support version? And Im afraid of migrating to android studio, I would prefer start all over and thats why I dont do it. – Karlo A. López Jul 23 '15 at 16:02
  • I see here a similar question to yours: http://stackoverflow.com/questions/24577811/notificationmanagercompat-cant-be-resolved-android-wear – gusridd Jul 24 '15 at 03:59
  • 1
    Thanks. At the end it was the v4 version, Im using an old version of eclipse so the SDK manager didnt actually tell me the most recent version. Again thanks. – Karlo A. López Jul 28 '15 at 22:34
1

check mark the following jars in build path or property ,it will work 1. android-support-v4.jar(appcombat/ibs) 2.android-support-v4-appcombat.jar(appcombat/ibs)

Reprator
  • 2,859
  • 2
  • 32
  • 55