Level Above: com.urban

I have a new mac (Lion 10.7.3). Installed Eclipse and Android-sdk. I selected 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) 

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

It is important to note that on my previous Mac (and PC) the same project works immediately after verification. This means that this is not a project issue.

Any ideas?

+4
source share
2 answers

Found a solution!

This is really caused by the ADT update.

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

After that, I followed this post by Gson NoClassDefFoundError after updating ADT and SDK Tools to version v17

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

I hope this helps people with the same problem.

+1
source

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

If you have an old ADT plugin on your old computer and you did it like this, it will cause errors ...

If so, I suggest going back to your old computer and updating all Google tools. Verify that the project is working properly and pass the SVN. Checkout on a new computer and hopefully it works ...

+1
source

Source: https://habr.com/ru/post/1413382/


All Articles