I tried starting a JUnit test (robotium) for my app:
public class MainTest extends ActivityInstrumentationTestCase2 {
private Solo so
The problem is in your call at
super("nix.android.contact", MainActivity.class);
In my code I have
super("nix.android.contact", Class.forName("nix.android.contact.MainActivity"));
I've also done it this way without have to name the Generic for the ActivityInstrumentationTestCase 2
public class TestApk extends ActivityInstrumentationTestCase2 {
private static final String TARGET_PACKAGE_ID = "nix.android.contact";
private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME = "nix.android.contact.MainActivity";
private static Class> launcherActivityClass;
static{
try {
launcherActivityClass = Class.forName(LAUNCHER_ACTIVITY_FULL_CLASSNAME);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
@SuppressWarnings("unchecked")
public TestApk() throws ClassNotFoundException {
super(TARGET_PACKAGE_ID, launcherActivityClass);
}