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.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值