无法在Android上运行我的第一个Hello世界

时间:2014-08-10 12:10:15

标签: android

我试图首次在Android上制作应用程序... 我已经安装了JDK,ADT等......

我设置了一个带有空白活动的新Android应用程序项目,我甚至无法运行该应用程序!

这就是我得到的:

08-10 12:06:18.518: D/AndroidRuntime(1715): Shutting down VM
08-10 12:06:18.528: W/dalvikvm(1715): threadid=1: thread exiting with uncaught exception (group=0xb2d99ce8)
08-10 12:06:18.548: E/AndroidRuntime(1715): FATAL EXCEPTION: main
08-10 12:06:18.548: E/AndroidRuntime(1715): Process: com.example.firstapp, PID: 1715
08-10 12:06:18.548: E/AndroidRuntime(1715): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.firstapp/com.example.firstapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.ActivityThread.access$800(ActivityThread.java:138)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.os.Handler.dispatchMessage(Handler.java:102)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.os.Looper.loop(Looper.java:136)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.ActivityThread.main(ActivityThread.java:5026)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at java.lang.reflect.Method.invokeNative(Native Method)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at java.lang.reflect.Method.invoke(Method.java:515)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at dalvik.system.NativeStart.main(Native Method)
08-10 12:06:18.548: E/AndroidRuntime(1715): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-10 12:06:18.548: E/AndroidRuntime(1715):     at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.Activity.setContentView(Activity.java:1930)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at com.example.firstapp.MainActivity.onCreate(MainActivity.java:14)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.Activity.performCreate(Activity.java:5242)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-10 12:06:18.548: E/AndroidRuntime(1715):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-10 12:06:18.548: E/AndroidRuntime(1715):     ... 11 more

请帮忙......谢谢

1 个答案:

答案 0 :(得分:0)

更改清单

中的目标SDK版本