Android SDK更新到17(SDK Tools --> 17)后的悲剧: java.lang.VerifyError: com.xxx

昨天更新了SDK 版本,更新到了最新的 17 ,然后根据它的要求又把eclipse ADT插件更到最新,然后跑项目发现问题了,先是Eclipse 打开时报错,项目也无法右击刷新,有的以前的项目不能正常打开.

出现一个dialog ,显示 

Initializing Java Tooling 
java.lang.NullPointerException

查找资料:

http://stackoverflow.com/questions/5335650/npe-during-eclipse-start-on-initializing-java-tooling


解决方法:重新那一个新的文件夹来放项目,只能这样了,发现eclipse不再报错了,项目也能右击刷新了


可是运行一些项目的时候,根本不能运行,出现了如下异常:(而有一些项目是可以正常跑的,像以前一样),发现这些出问题的项目都是需要引入外部jar包的

03-31 10:35:57.607: E/AndroidRuntime(4436): java.lang.VerifyError: com.xxx.project.twitter.TwitterApp

03-31 10:35:57.607: E/AndroidRuntime(4436): at com.xxx.project.activity.HomeActivity.getWidgetInstanceForAWordView(HomeActivity.java:158)

03-31 10:35:57.607: E/AndroidRuntime(4436): at com.xxx.project.activity.HomeActivity.getAllWidgetInstance(HomeActivity.java:138)

03-31 10:35:57.607: E/AndroidRuntime(4436): at com.xxx.project.activity.HomeActivity.onCreate(HomeActivity.java:128)

03-31 10:35:57.607: E/AndroidRuntime(4436): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)

03-31 10:35:57.607: E/AndroidRuntime(4436): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1619)

03-31 10:35:57.607: E/AndroidRuntime(4436): at android.app.ActivityThread.startActivityNow(ActivityThread.java:1495)

03-31 10:35:57.607: E/AndroidRuntime(4436): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)

03-31 10:35:57.607: E/AndroidRuntime(4436): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)

03-31 10:35:57.607: E/AndroidRuntime(4436): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:695)

03-31 10:35:57.607: E/AndroidRuntime(4436): at android.widget.TabHost.setCurrentTab(TabHost.java:366)

03-31 10:35:57.607: E/AndroidRuntime(4436): at android.widget.TabHost.addTab(TabHost.java:256)


上网找资料:

http://stackoverflow.com/questions/9817372/updated-sdk-tools-and-adt-to-17-and-now-getting-verifyerrors 

这是跟我遇到的问题一模一样哎!!!

用它的解决方法:

http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17


一切ok啦,太开心啦!

你可能感兴趣的:(java,eclipse,android,jar,dialog,tools)