我有引用两个库项目一期工程。升级ADT和SDK工具后,version 17 ,应用程序,只要它击中一个参考图书馆项目之一定义的类崩溃。如错误:
I have a project that references two library projects. After upgrading the ADT and SDK tools to version 17, the app crashes as soon as it hits a reference to a class defined in one of the Library projects. Errors such as:
Unable to resolve superclass of Lcom/my/package/name/MyActivity; (118)
Link of class 'Lcom/my/package/name/MyActivity;' failed
VFY: unable to find class referenced in signature (Lcom/my/package/name/MyActivity;)
和
FATAL EXCEPTION: main
java.lang.VerifyError: my/package/name/util/SomeClass
at my.package.name.App.onCreate(App.java:120)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:969)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3925)
at android.app.ActivityThread.access$1300(ActivityThread.java:122)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1184)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4340)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
(我的包和类是没有这样的命名方式,只是修改他们在这里发帖)
(My package and classes are aren't named that way, just modified them for posting here)
在这里发生了什么任何想法?据我可以告诉有没有生成错误和我的项目看起来是正确引用库项目。
Any ideas on what is happening here? As far as I can tell there are no build errors and my project looks like it is referencing the library project correctly.
我有完全相同的问题。找到这个帖子:如何解决NoClassDefFoundError的与ADT 17 救我有些无奈。
I had the exact same problem. Finding this post: How to fix the "NoClassDefFoundError" with ADT 17 save me some frustration.