Nokia-X NokiaNotificationMessaging error-> java.lang.NoClassDefFoundError: com.nokia.push.PushRegistrar

StackOverflow https://stackoverflow.com/questions/22881742

Question

Hi i tried NOKIA NOTIFICATION MESSAGING in android but i face the following error

LOG:

04-05 13:43:07.801: E/AndroidRuntime(1042): FATAL EXCEPTION: main
04-05 13:43:07.801: E/AndroidRuntime(1042): java.lang.NoClassDefFoundError: com.nokia.push.PushRegistrar
04-05 13:43:07.801: E/AndroidRuntime(1042):     at com.example.nokiapush.NotificationsManager.<init>(NotificationsManager.java:68)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at com.example.nokiapush.NotificationsManager.getInstance(NotificationsManager.java:46)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at com.example.nokiapush.MainActivity.onCreate(MainActivity.java:65)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.app.Activity.performCreate(Activity.java:5180)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2031)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2092)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.app.ActivityThread.access$600(ActivityThread.java:133)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.os.Looper.loop(Looper.java:137)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at android.app.ActivityThread.main(ActivityThread.java:4807)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at java.lang.reflect.Method.invokeNative(Native Method)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at java.lang.reflect.Method.invoke(Method.java:511)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:559)
04-05 13:43:07.801: E/AndroidRuntime(1042):     at dalvik.system.NativeStart.main(Native Method)
Was it helpful?

Solution

Make sure that you are also exporting that library. If you are not exporting, library is only available at build time. Select Build path properties from eclipse (if using that) and from "Order and Export" tab select push jar to be exported. If it is not visible there check that you are exporting private libraries and dependencies.

Make also sure that you are running your app in Android emulator that is having Nokia X image (build target is Nokia X)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top