4

I've got a new mac (Lion 10.7.3). Installed Eclipse and android sdk. Checked out my project from SVN , tried to run and got this ugly exception:

05-20 12:17:21.175: E/AndroidRuntime(32499): FATAL EXCEPTION: main
05-20 12:17:21.175: E/AndroidRuntime(32499): java.lang.NoClassDefFoundError: com.urbanairship.UAirship
05-20 12:17:21.175: E/AndroidRuntime(32499):    at com.neo.ovs3.MyApp.onCreate(MyApp.java:16)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3292)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at android.app.ActivityThread.access$2200(ActivityThread.java:117)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:969)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at android.os.Looper.loop(Looper.java:130)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at android.app.ActivityThread.main(ActivityThread.java:3703)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at java.lang.reflect.Method.invokeNative(Native Method)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at java.lang.reflect.Method.invoke(Method.java:507)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
05-20 12:17:21.175: E/AndroidRuntime(32499):    at dalvik.system.NativeStart.main(Native Method)

Tried to fix it in various ways by creating a new project ,recreating manifest file , changing the UA library , configuring the build path.Nothing helps.The project itself compiles without errors.

Important to mention that on my previous mac (and on PC) the same project is working immediately after check out.That means that this is not the project problem.

Any ideas ?

Ivelius
  • 4,953
  • 7
  • 30
  • 54

2 Answers2

1

Google has made some changes to the way they handle projects that use library projects in the latest ADT versions. While these changes are blessed, they cause errors when mixing old ADT plugin versions with new ones.

If you have an old ADT plugin in the old computer and you committed it this way, it would cause errors...

If so, what I suggest is going back to your old computer and updating all Google tools. Make sure the project is running fine and commit to the SVN. Checkout on the new computer and hopefully it would work...

IncrediApp
  • 10,303
  • 2
  • 33
  • 24
  • Ok , I've updated all google tools and plugin on the old computer and now I'm facing the same issue there.This is a disaster cos I now I can't make my project work on any machine :( HELP ! – Ivelius May 21 '12 at 08:35
  • It seems that this library doesn't play well with the new tools... Which means that they are doing something wrong... Google this: java.lang.NoClassDefFoundError: com.urbanairship.UAirship – IncrediApp May 21 '12 at 08:43
  • Try contacting this guy, as he faced the same problem 2 months ago, so I assume he found a solution by now... http://groups.google.com/groups/profile?enc_user=1EV_WBgAAAC3dFZhJ_dXyh-7sjQvHB3GtiDKbEn1fjJfYkQTWXi1Vg – IncrediApp May 21 '12 at 08:46
1

Found a solution !

This indeed caused by ADT update.

I just created a new android project and noticed that the structure is different from my previous project from SVN.

After that I followed this post Gson NoClassDefFoundError after ADT and SDK Tools update to v17

And copied the old files to the new project. Finally all worked fine.

I hope this will help people with the same problem.

Community
  • 1
  • 1
Ivelius
  • 4,953
  • 7
  • 30
  • 54