java.lang.RuntimeException android ActivityInstrumentationTestCase2 test
<p>I want to run a test class which extends ActivityInstrumentationTestCase2. But I got next logs.
I set the break point to the target activity at Oncreate, but it even did't go there, then I got the error. </p>

<pre><code>[2012-07-30 18:14:42 - myapp] Uploading myapp.apk onto device '66313d1c'
[2012-07-30 18:14:47 - myapp] Installing myapp.apk...
[2012-07-30 18:14:57 - myapp] Success!
[2012-07-30 18:14:57 - mytestapp] Launching instrumentation android.test.InstrumentationTestRunner on device 66313d1c
[2012-07-30 18:14:57 - mytestapp] Collecting test information
[2012-07-30 18:14:58 - mytestapp] Test run failed: Instrumentation run failed due to 'java.lang.RuntimeException'
</code></pre>

<p>I did this:</p>

<pre><code>adb shell pm list instrumentation
</code></pre>

<p>and I could see my test app.</p>

<p>Whole logs:</p>

<pre><code>07-30 20:37:16.172: W/dalvikvm(19499): threadid=1: thread exiting with uncaught exception (group=0x4001e578)
07-30 20:37:16.202: E/AndroidRuntime(19499): FATAL EXCEPTION: main
07-30 20:37:16.202: E/AndroidRuntime(19499): java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo{mytestapp/android.test.InstrumentationTestRunner}: java.lang.RuntimeException: Could not instantiate test class. Class:myapp.activity.myactivityTest
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3257)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.app.ActivityThread.access$2200(ActivityThread.java:117)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:973)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.os.Handler.dispatchMessage(Handler.java:99)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.os.Looper.loop(Looper.java:130)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.app.ActivityThread.main(ActivityThread.java:3691)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at java.lang.reflect.Method.invokeNative(Native Method)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at java.lang.reflect.Method.invoke(Method.java:507)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at dalvik.system.NativeStart.main(Native Method)
07-30 20:37:16.202: E/AndroidRuntime(19499): Caused by: java.lang.RuntimeException: Could not instantiate test class. Class:myapp.activity.myactivityTest
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.test.AndroidTestRunner.runFailed(AndroidTestRunner.java:233)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.test.AndroidTestRunner.buildSingleTestMethod(AndroidTestRunner.java:100)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.test.AndroidTestRunner.setTestClassName(AndroidTestRunner.java:51)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.test.suitebuilder.TestSuiteBuilder.addTestClassByName(TestSuiteBuilder.java:81)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.test.InstrumentationTestRunner.parseTestClass(InstrumentationTestRunner.java:418)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.test.InstrumentationTestRunner.parseTestClasses(InstrumentationTestRunner.java:399)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:364)
07-30 20:37:16.202: E/AndroidRuntime(19499):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3254)
</code></pre>

<p>myactivityTestactivity</p>

<pre><code>package myapp;

    import myapp.R;
    import android.test.ActivityInstrumentationTestCase2;

    public class myactivityTest extends ActivityInstrumentationTestCase2&lt;myactivity&gt; {

        public ImportFileSelectorTest(String name) {
            super("myactivity", myactivity.class);
        }

        protected final void setUp() throws Exception {
            super.setUp();
        }

        protected final void tearDown() throws Exception {
            super.tearDown();
        }

        public void testSimpleDefaults(){
            assertTrue(true);
        }

    }
</code></pre>

<p>Any hint will be helpful. Thank you.</p>
