我无法在eclipse中运行我的hello world程序。我在logcat中遇到以下错误,在模拟器中很遗憾你的helloworld应用程序已经停止工作..........
08-21 08:51:45.500: E/AndroidRuntime(831): FATAL EXCEPTION: main
08-21 08:51:45.500: E/AndroidRuntime(831): Process: com.example.helloworldd, PID: 831
08-21 08:51:45.500: E/AndroidRuntime(831): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.helloworldd/com.example.helloworldd.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.ActivityThread.access$800(ActivityThread.java:138)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.os.Handler.dispatchMessage(Handler.java:102)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.os.Looper.loop(Looper.java:136)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.ActivityThread.main(ActivityThread.java:5026)
08-21 08:51:45.500: E/AndroidRuntime(831): at java.lang.reflect.Method.invokeNative(Native Method)
08-21 08:51:45.500: E/AndroidRuntime(831): at java.lang.reflect.Method.invoke(Method.java:515)
08-21 08:51:45.500: E/AndroidRuntime(831): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-21 08:51:45.500: E/AndroidRuntime(831): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
08-21 08:51:45.500: E/AndroidRuntime(831): at dalvik.system.NativeStart.main(Native Method)
08-21 08:51:45.500: E/AndroidRuntime(831): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-21 08:51:45.500: E/AndroidRuntime(831): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-21 08:51:45.500: E/AndroidRuntime(831): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-21 08:51:45.500: E/AndroidRuntime(831): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-21 08:51:45.500: E/AndroidRuntime(831): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.Activity.setContentView(Activity.java:1930)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-21 08:51:45.500: E/AndroidRuntime(831): at com.example.helloworldd.MainActivity.onCreate(MainActivity.java:13)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.Activity.performCreate(Activity.java:5242)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-21 08:51:45.500: E/AndroidRuntime(831): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-21 08:51:45.500: E/AndroidRuntime(831): ... 11 more
答案 0 :(得分:0)
如果版本是4.4w,请将android版本更改为更低版本(4.4.2)并在清单中设置目标版本,如下所示
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="19" />