在Android项目中创建一个包含main()方法的类,直接右键运行该类时会报如下错误:
## An unexpected error has been detected by Java Runtime Environment:## Internal Error (classFileParser.cpp:2923), pid=7780, tid=7832# Error: ShouldNotReachHere()## Java VM: Java HotSpot(TM) Client VM (11.0-b15 mixed mode windows-x86)# An error report file with more information is saved as:# D:\编程代码集\Android\HelloAndroid\hs_err_pid7780.log## If you would like to submit a bug report, please visit:# http://java.sun.com/webapps/bugreport/crash.jsp#从 链接中找到了解决方法:
具体解决方法如下:
1.选中项目,右键 -> Run As -> Run Configurations...
2.在Java Aplication(或你对应的分类)中找到你刚运行的项目
3.切换到Classpath选项栏,点击Bootstrap Entries里面的Android Library,然后点击右侧的Advanced.. -> Add Library -> JRE System Library,一路next即可。
====================================================================================
作者:欧阳鹏 欢迎转载,与人分享是进步的源泉!
转载请保留原文地址:
====================================================================================