You cannot combine swipe dismissal and the action bar.

03-17 08:20:26.530: E/AndroidRuntime(841): FATAL EXCEPTION: main
03-17 08:20:26.530: E/AndroidRuntime(841): Process: com.mikewong.tool.tesseract, PID: 841
03-17 08:20:26.530: E/AndroidRuntime(841): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mikewong.tool.tesseract/com.mikewong.tool.tesseract.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.ActivityThread.access$800(ActivityThread.java:138)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.os.Handler.dispatchMessage(Handler.java:102)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.os.Looper.loop(Looper.java:136)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.ActivityThread.main(ActivityThread.java:5026)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at java.lang.reflect.Method.invokeNative(Native Method)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at java.lang.reflect.Method.invoke(Method.java:515)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at dalvik.system.NativeStart.main(Native Method)
03-17 08:20:26.530: E/AndroidRuntime(841): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
03-17 08:20:26.530: E/AndroidRuntime(841): 	at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:277)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2889)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3154)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:305)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.Activity.setContentView(Activity.java:1930)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at com.mikewong.tool.tesseract.MainActivity.onCreate(MainActivity.java:75)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.Activity.performCreate(Activity.java:5242)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
03-17 08:20:26.530: E/AndroidRuntime(841): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
03-17 08:20:26.530: E/AndroidRuntime(841): 	... 11 more


I had the same issue. But sdk version was not the cause for this exception.

In the AndroidManifest.xml file you have the theme has ActionBar in it.

android:theme="@style/AppTheme" >

Change the above line to

android:theme="@android:style/Theme.DeviceDefault" >

That will fix the exception.


你可能感兴趣的:(Android)