Android项目运行junit测试类时出现错误Internal Error (classFileParser.cpp:3494)的解决办法

以前的项目运行好好的,升级了ADT后,进行junit测试时出现错误:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (classFileParser.cpp:3494), pid=7480, tid=7376
#  Error: ShouldNotReachHere()
#
# JRE version: 6.0_29-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.4-b02 mixed mode windows-amd64 compressed oops)
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

解决办法:
1.选中junit测试类,右键 -> Run As -> Run Configurations...
2.切换到Classpath选项栏,删掉Bootstrap Entries里面的Android Library,然后点击右侧的Advanced.. -> Add Library -> JRE System Library,一路next即可。

这时再运行该类,就能正常运行了。

你可能感兴趣的:(Android项目运行junit测试类时出现错误Internal Error (classFileParser.cpp:3494)的解决办法)