Today, I studied message pushing on the Android platform and found a ready-made open-source project androidpn. I tried it according to the introduction, but I reported that some types cannot be found. Changing the referenced package lib to libs does not work. Later, the dependent jar is removed from buildpath (right-> remove
From buildpath), right-click the project and choose Android tools> fix project properties.
The following are error logs:
E/AndroidRuntime(525): java.lang.NoClassDefFoundError: org.androidpn.client.PersistentConnectionListenerE/AndroidRuntime(525): at org.androidpn.client.XmppManager.<init>(XmppManager.java:98)E/AndroidRuntime(525): at org.androidpn.client.NotificationService.onCreate(NotificationService.java:115)E/AndroidRuntime(525): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2780)E/AndroidRuntime(525): at android.app.ActivityThread.access$3200(ActivityThread.java:119)E/AndroidRuntime(525): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1917)E/AndroidRuntime(525): at android.os.Handler.dispatchMessage(Handler.java:99)E/AndroidRuntime(525): at android.os.Looper.loop(Looper.java:123)E/AndroidRuntime(525): at android.app.ActivityThread.main(ActivityThread.java:4363)E/AndroidRuntime(525): at java.lang.reflect.Method.invokeNative(Native Method)E/AndroidRuntime(525): at java.lang.reflect.Method.invoke(Method.java:521)E/AndroidRuntime(525): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)E/AndroidRuntime(525): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)E/AndroidRuntime(525): at dalvik.system.NativeStart.main(Native Method)
Note that although there is a solution here for both http://www.cnblogs.com/hanyonglu/archive/2012/03/16/2399655.html and here, it doesn't work for me (ADT
20) http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17/comment-page-1#comment-4346
Original address http://marspring.mobi/adt-filenotfoundexception/