Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prolem using urbanairship Provider android

I am using urbanairship to show notifications. I have updated my Android SDK to latest update and it starts showing error related to urbanairship provider and it was working fine with older version.

05-22 17:54:30.476: E/AndroidRuntime(575): FATAL EXCEPTION: main
05-22 17:54:30.476: E/AndroidRuntime(575): java.lang.RuntimeException: Unable to get provider com.urbanairship.UrbanAirshipProvider: java.lang.ClassNotFoundException: com.urbanairship.UrbanAirshipProvider
05-22 17:54:30.476: E/AndroidRuntime(575):  at android.app.ActivityThread.installProvider(ActivityThread.java:4289)
05-22 17:54:30.476: E/AndroidRuntime(575):  at android.app.ActivityThread.installContentProviders(ActivityThread.java:4041)
05-22 17:54:30.476: E/AndroidRuntime(575):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3995)
05-22 17:54:30.476: E/AndroidRuntime(575):  at android.app.ActivityThread.access$1300(ActivityThread.java:127)
05-22 17:54:30.476: E/AndroidRuntime(575):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1217)
05-22 17:54:30.476: E/AndroidRuntime(575):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-22 17:54:30.476: E/AndroidRuntime(575):  at android.app.ActivityThread.main(ActivityThread.java:4508)
05-22 17:54:30.476: E/AndroidRuntime(575):  at java.lang.reflect.Method.invokeNative(Native Method)
05-22 17:54:30.476: E/AndroidRuntime(575):  at java.lang.reflect.Method.invoke(Method.java:511)
05-22 17:54:30.476: E/AndroidRuntime(575):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
05-22 17:54:30.476: E/AndroidRuntime(575):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
05-22 17:54:30.476: E/AndroidRuntime(575):  at dalvik.system.NativeStart.main(Native Method)
05-22 17:54:30.476: E/AndroidRuntime(575): Caused by: java.lang.ClassNotFoundException: com.urbanairship.UrbanAirshipProvider
05-22 17:54:30.476: E/AndroidRuntime(575):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
05-22 17:54:30.476: E/AndroidRuntime(575):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-22 17:54:30.476: E/AndroidRuntime(575):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-22 17:54:30.476: E/AndroidRuntime(575):  at android.app.ActivityThread.installProvider(ActivityThread.java:4274)
05-22 17:54:30.476: E/AndroidRuntime(575):  ... 12 more

I am using urbanairship-lib-2.1.4.jar in my project. Is there any compatibility issue or what?

like image 605
Nomiluks Avatar asked May 22 '13 12:05

Nomiluks


1 Answers

Yey! Just found a solution for that! The problem is in Android Private Libraries which were introduced with latest update. For some reason by default they are ticked off in project properties.

Just go to the Project -> Properties -> Java Build Path -> Order and Export and check Android Private Libraries . This solved my problem.

like image 99
Pavel Dudka Avatar answered Sep 28 '22 07:09

Pavel Dudka