环境:eclipse jdk1.7

代码如下:
public class Iteration extends ActivityInstrumentationTestCase2 {

private static final String PACKAGE = "com.example.a";
private static final String LAUNCHER_ACTIVITY = "com.example.a.activity.MainActivity";
private static Class launcherActivityClass;
private Solo solo;
static {
try {
System.out.println("begain1");
launcherActivityClass = Class.forName(LAUNCHER_ACTIVITY);
} catch (ClassNotFoundException e) {
System.out.println("这里出错了哦");
throw new RuntimeException(e);
}
}
...
}
代码执行到 launcherActivityClass = Class.forName(LAUNCHER_ACTIVITY) 这里就开始报错了~
Test run failed: Instrumentation run failed due to 'java.lang.ClassNotFoundException'
已经 Block 好几天了,求助大神帮忙~


↙↙↙阅读原文可查看相关链接,并与作者交流