在Android工程中运行main函数

在main函数中右键 --> Run As --> Run Configurations..

Java Application中的类 --> Classpath --> Bootstrap Entries --> Advanced...

Add Library -- > OK

JRE System Library --> Next

default JRE --> Finish

将JRE Library up到最上方

原文地址:https://www.cnblogs.com/chaizp/p/5093462.html