標籤:
我在 android環境下寫了一個測試Java類,帶有main方法,可是無法運行,如下提示:
Invalid layout of java.lang.String at value
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (javaClasses.cpp:136), pid=88924, tid=89728
# fatal error: Invalid layout of preloaded class
#
# JRE version: (7.0_72-b14) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.72-b04 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# D:\Android\AndroidAdt\workspace\Test01\hs_err_pid88924.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
解決方案:run as ---> Run Configurations --> classPath remove掉Bootstrap Entries下的android.jar
然後 Add Library -->JRE System Libray 完成後 在運行就OK了!
android工程下不能運行java main程式的解決辦法