Brian Reinhold
Brian Reinhold

Reputation: 2455

Updating Android SDKs (15 r 3) causes all built apks to crash when run

I just did one of those auto updates of the Android SDK (API 15 r3) and associated SDK tools. Eclipse updates for the plugin as well.

Now nothing I run works. Every application gives the same type of initialization error:

ExceptionInInitialization error.

I am unable to revert; re-installs, workspace cleanouts, etc. I cannot get rid of it. Unfortunately it seems the previous versions that I had were overwritten and unrecoverable.

Does anyone have any idea what went so bad? (I don't know if I will ever dare to do an auto update again. Comrades at work have also suffered the same catastrophe.

HERE IS A STACK TRACE WHICH I NEGLECTED TO ADD.

03-23 18:24:36.578: E/AndroidRuntime(3090): FATAL EXCEPTION: main
03-23 18:24:36.578: E/AndroidRuntime(3090): java.lang.ExceptionInInitializerError
03-23 18:24:36.578: E/AndroidRuntime(3090):     at com.lampreynetworks.ahd.oilbath.MeasurementLogActivity.onCreate(MeasurementLogActivity.java:66)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.app.Activity.performCreate(Activity.java:4465)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.os.Looper.loop(Looper.java:137)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at android.app.ActivityThread.main(ActivityThread.java:4424)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at java.lang.reflect.Method.invokeNative(Native Method)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at java.lang.reflect.Method.invoke(Method.java:511)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
03-23 18:24:36.578: E/AndroidRuntime(3090):     at dalvik.system.NativeStart.main(Native Method)
03-23 18:24:36.578: E/AndroidRuntime(3090): Caused by: java.lang.NoClassDefFoundError: com.lampreynetworks.ahd.oxp.Nomenclature
03-23 18:24:36.578: E/AndroidRuntime(3090):     at com.lampreynetworks.ahd.oilbath.MeasurementAdapter.<clinit>(MeasurementAdapter.java:82)
03-23 18:24:36.578: E/AndroidRuntime(3090):     ... 15 more

Upvotes: 0

Views: 243

Answers (2)

Brian Cooley
Brian Cooley

Reputation: 11662

There's been a change to the dependency management system. Xavier Durochet posted a Google+ item about it.

It looks like com.lampreynetworks.ahd.oxp.Nomenclature was in Referenced Libraries in your project. It now needs to be located only under Android Dependencies. You can remove the Referenced Libraries dependency from the Libraries tab under the project's Properties > Java Build Path

Also, the lib directory should be changed to libs.

In case the Google+ item gets deleted at some point, it links to a blog post and a post on tools.android.com which I am linking here for completeness.

Upvotes: 2

Barak
Barak

Reputation: 16393

Did you update the tools as well as the SDK? I believe that the new SDK requires ADT 17.

Upvotes: 0

Related Questions