我尝试在Windows 8中的Android Studio上构建第一个简单的HelloWorld项目:
package com.samuel.helloworld;
/**
* Created by Samuel on 5/16/13.
*/
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
运行时出现异常错误:
Exception in thread "main" java.lang.ClassNotFoundException: com.samuel.helloworld.HelloWorld
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
使用退出代码1完成处理
出了什么问题?