每當我嘗試運行測試時,都會收到以下錯誤消息。我也嘗試加載一些樣本並測試它們,但是我得到了同樣的錯誤。從教程運行helloworldtest時出錯
這會產生以下教程發現here
感謝所有幫助
java.lang.RuntimeException: Unable to resolve activity for: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=ca.imt.helloandroid.HelloAndroid/ca.imt.helloandroid.HelloAndroid }
at android.app.Instrumentation.startActivitySync(Instrumentation.java:371)
at android.test.InstrumentationTestCase.launchActivityWithIntent(InstrumentationTestCase.java:120)
at android.test.InstrumentationTestCase.launchActivity(InstrumentationTestCase.java:98)
at android.test.ActivityInstrumentationTestCase2.getActivity(ActivityInstrumentationTestCase2.java:87)
at ca.imt.helloandroid.test.HelloAndroidTest.setUp(HelloAndroidTest.java:24)
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)
更新:我一直在使用SDK平臺2.1-update1,API7,修訂版2. 我更改爲最新版本(SDK平臺2.2,API 8,修訂版1)並且工作正常。這會做現在,但我瞄準的實際電話運行2.1,所以這仍然是一個問題。 – paul 2010-05-26 15:40:18