Hi,
I'm using robotium to test out ApiDemos. Below is the code snippet
public class ApiDemosTest extends
ActivityInstrumentationTestCase2<ApiDemos>{
private Solo solo;
private Intent mStartIntent;
public ApiDemosTest() {
super("com.example.android.apis.ApiDemos", ApiDemos.class);
}
public void setUp() throws Exception {
mStartIntent = new Intent(Intent.ACTION_MAIN);
setActivityIntent(mStartIntent);
solo = new Solo(getInstrumentation(), getActivity());
}
I keep getting the following exception even though I've set the
setActivityIntent. Any idea why this is happening and what should I do
to resolve it? Thanks!
java.lang.RuntimeException: Unable to resolve activity for: Intent
{ act=android.intent.action.MAIN flg=0x10000000
cmp=com.example.android.apis.ApiDemos/
com.example.android.apis.ApiDemos }
at android.app.Instrumentation.startActivitySync(Instrumentation.java:
371)
at
android.test.InstrumentationTestCase.launchActivityWithIntent(InstrumentationTestCase.java:
120)
at
android.test.ActivityInstrumentationTestCase2.getActivity(ActivityInstrumentationTestCase2.java:
89)
at com.jayway.test.ApiDemosTest.setUp(ApiDemosTest.java:50)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:
430)
at android.app.Instrumentation
$InstrumentationThread.run(Instrumentation.java:1447)
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en