I've had a similar problem. Before I understood that the first param
by specifying Android 2.2 as the target runtime. Since then I've
now I can run the test on a 2.1 runtime. Very interesting...
> Hi Andy!
>
> The first problem I see is in your constructor:
>
> > public MainActivityTest() {
> > super("com.asurion.android.mobilerecovery.activity.MainActivity", MainActivity.class);
> > }
>
> The string is supposed to be only the package name of the application
> you wish to test. That's the <manifest package="..." > parameter from
> the very top of the application project's AndroidManifest.xml, and the
> same as the <instrumentation android:targetPackage="..." > parameter
> in your test project's AndroidManifest.xml.
>
> Thanks,
> Hugo
>
> On Jun 25, 1:53 am, andrijaperovic <
andrijapero...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi everyone,
>
> > the below attached code is working fine on an emulator running 2.1-
> > update1, however when I try running it on a physical phone (my android
> > junit class), the failure trace
> > complains with the following error. Any help would be appreciated.
>
> > java.lang.RuntimeException: Unable to resolve activity for: Intent
> > { act=android.intent.action.MAIN flg=0x10000000
> > cmp=com.asurion.android.mobilerecovery.activity.MainActivity/
> > com.asurion.android.mobilerecovery.activity.MainActivity }
> > at android.app.Instrumentation.startActivitySync(Instrumentation.java:
> > 447)
> > at
> > android.test.InstrumentationTestCase.launchActivityWithIntent(Instrumentati onTestCase.java:
> > 106)
> > at
> > android.test.ActivityInstrumentationTestCase2.getActivity(ActivityInstrumen tationTestCase2.java:
> > 89)
> > at
> > com.asurion.android.mobilerecovery.tests.MainActivityTest.setUp(MainActivit yTest.java: