我刚刚下载了最新的Eclipse ADT Bundle。按照教程(http://developer.android.com/training/basics/firstapp/running-app.html)在AVD上运行第一个测试应用程序MyFIrstApp时,应用程序崩溃。 在控制台中它说:
[2014-08-10 13:10:51 - MyFirstApp] Android Launch!
[2014-08-10 13:10:51 - MyFirstApp] adb is running normally.
[2014-08-10 13:10:51 - MyFirstApp] Performing com.mysite.myfirstapp.MainActivity activity launch
[2014-08-10 13:10:51 - MyFirstApp] Automatic Target Mode: launching new emulator with compatible AVD 'AVD_for_Nexus_One_by_Google'
[2014-08-10 13:10:51 - MyFirstApp] Launching a new emulator with Virtual Device 'AVD_for_Nexus_One_by_Google'
[2014-08-10 13:11:35 - MyFirstApp] New emulator found: emulator-5554
[2014-08-10 13:11:35 - MyFirstApp] Waiting for HOME ('android.process.acore') to be launched...
[2014-08-10 13:13:32 - MyFirstApp] HOME is up on device 'emulator-5554'
[2014-08-10 13:13:32 - MyFirstApp] Uploading MyFirstApp.apk onto device 'emulator-5554'
[2014-08-10 13:13:34 - MyFirstApp] Installing MyFirstApp.apk...
[2014-08-10 13:15:53 - MyFirstApp] Failed to install MyFirstApp.apk on device 'emulator-5554!
[2014-08-10 13:15:53 - MyFirstApp] (null)
[2014-08-10 13:15:54 - MyFirstApp] Launch canceled!
在LogCat中它说:
08-10 12:23:41.590: D/AndroidRuntime(965): Shutting down VM
08-10 12:23:41.600: W/dalvikvm(965): threadid=1: thread exiting with uncaught exception (group=0xb2a30d70)
08-10 12:23:41.620: E/AndroidRuntime(965): FATAL EXCEPTION: main
08-10 12:23:41.620: E/AndroidRuntime(965): Process: com.mysite.myfirstapp, PID: 965
08-10 12:23:41.620: E/AndroidRuntime(965): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mysite.myfirstapp/com.mysite.myfirstapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.ActivityThread.access$800(ActivityThread.java:138)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.os.Handler.dispatchMessage(Handler.java:102)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.os.Looper.loop(Looper.java:136)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.ActivityThread.main(ActivityThread.java:5026)
08-10 12:23:41.620: E/AndroidRuntime(965): at java.lang.reflect.Method.invokeNative(Native Method)
08-10 12:23:41.620: E/AndroidRuntime(965): at java.lang.reflect.Method.invoke(Method.java:515)
08-10 12:23:41.620: E/AndroidRuntime(965): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-10 12:23:41.620: E/AndroidRuntime(965): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
08-10 12:23:41.620: E/AndroidRuntime(965): at dalvik.system.NativeStart.main(Native Method)
08-10 12:23:41.620: E/AndroidRuntime(965): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-10 12:23:41.620: E/AndroidRuntime(965): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-10 12:23:41.620: E/AndroidRuntime(965): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-10 12:23:41.620: E/AndroidRuntime(965): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-10 12:23:41.620: E/AndroidRuntime(965): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.Activity.setContentView(Activity.java:1930)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-10 12:23:41.620: E/AndroidRuntime(965): at com.mysite.myfirstapp.MainActivity.onCreate(MainActivity.java:14)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.Activity.performCreate(Activity.java:5242)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-10 12:23:41.620: E/AndroidRuntime(965): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-10 12:23:41.620: E/AndroidRuntime(965): ... 11 more
08-10 12:26:06.250: I/Process(965): Sending signal. PID: 965 SIG: 9
08-10 12:26:07.950: D/AndroidRuntime(1002): Shutting down VM
08-10 12:26:07.970: W/dalvikvm(1002): threadid=1: thread exiting with uncaught exception (group=0xb2a30d70)
08-10 12:26:08.000: E/AndroidRuntime(1002): FATAL EXCEPTION: main
08-10 12:26:08.000: E/AndroidRuntime(1002): Process: com.mysite.myfirstapp, PID: 1002
08-10 12:26:08.000: E/AndroidRuntime(1002): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mysite.myfirstapp/com.mysite.myfirstapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.ActivityThread.access$800(ActivityThread.java:138)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.os.Handler.dispatchMessage(Handler.java:102)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.os.Looper.loop(Looper.java:136)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.ActivityThread.main(ActivityThread.java:5026)
08-10 12:26:08.000: E/AndroidRuntime(1002): at java.lang.reflect.Method.invokeNative(Native Method)
08-10 12:26:08.000: E/AndroidRuntime(1002): at java.lang.reflect.Method.invoke(Method.java:515)
08-10 12:26:08.000: E/AndroidRuntime(1002): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-10 12:26:08.000: E/AndroidRuntime(1002): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
08-10 12:26:08.000: E/AndroidRuntime(1002): at dalvik.system.NativeStart.main(Native Method)
08-10 12:26:08.000: E/AndroidRuntime(1002): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-10 12:26:08.000: E/AndroidRuntime(1002): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-10 12:26:08.000: E/AndroidRuntime(1002): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-10 12:26:08.000: E/AndroidRuntime(1002): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-10 12:26:08.000: E/AndroidRuntime(1002): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.Activity.setContentView(Activity.java:1930)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-10 12:26:08.000: E/AndroidRuntime(1002): at com.mysite.myfirstapp.MainActivity.onCreate(MainActivity.java:14)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.Activity.performCreate(Activity.java:5242)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-10 12:26:08.000: E/AndroidRuntime(1002): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-10 12:26:08.000: E/AndroidRuntime(1002): ... 11 more
08-10 12:31:08.200: I/Process(1002): Sending signal. PID: 1002 SIG: 9
我是编程新手,我不知道该怎么做。教程似乎措辞似乎在学习过程的这个阶段从未出现过错误。请帮忙!