Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
356 views
in Technique[技术] by (71.8m points)

Class not found error after updating ADT and Android sdk tools to latest ver 22

Earlier it was working fine,as soon i updated my adt and android sdk tools to latest version rev 22, my app stopped working below is logcat output

please help

05-16 16:36:01.922: E/AndroidRuntime(12717): FATAL EXCEPTION: main
05-16 16:36:01.922: E/AndroidRuntime(12717): java.lang.ExceptionInInitializerError
05-16 16:36:01.922: E/AndroidRuntime(12717):    at com.adroit.photoflick.TagsGridActivity.onStart(TagsGridActivity.java:303)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1163)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.app.Activity.performStart(Activity.java:5018)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2032)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.app.ActivityThread.access$600(ActivityThread.java:130)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.os.Handler.dispatchMessage(Handler.java:99)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.os.Looper.loop(Looper.java:137)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at android.app.ActivityThread.main(ActivityThread.java:4745)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at java.lang.reflect.Method.invokeNative(Native Method)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at java.lang.reflect.Method.invoke(Method.java:511)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
05-16 16:36:01.922: E/AndroidRuntime(12717):    at dalvik.system.NativeStart.main(Native Method)
05-16 16:36:01.922: E/AndroidRuntime(12717): Caused by: java.lang.NoClassDefFoundError: com.dropbox.client2.session.Session$AccessType
05-16 16:36:01.922: E/AndroidRuntime(12717):    at com.adroit.lazyadapter.ImageLoader.<clinit>(ImageLoader.java:96)
05-16 16:36:01.922: E/AndroidRuntime(12717):    ... 15 more
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Problem occurs for me with projects which use Support library.

This thread helped me a lot to resolve ClassNotFoundException issue with ADT 22:

https://code.google.com/p/android/issues/detail?id=55304

The idea is to enable Android Private Libraries on Java Buils Path | Order and Export

Nikolay's workaround works for me: For all projects (app and library):

  1. Right click the project, and choose Properties
  2. Go to Java Build Path-Order and Export.
  3. Tick 'Android Private Libraries'
  4. (Optional) Clean all projects if necessary

Thanks, Nikolay.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...