Home  >  Forum  >  Android
Post New Query

Android Error: RuntimeException: Unable to start activity


joined on
August 11,2014
Asked on August 11,2014
I have created a project using eclipse wizard. And when I tried to run in Eclipse AVD, then got th below error in LogCat.

 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.app/com.test.app.MainActivity}: 
 android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.ActivityThread.access$800(ActivityThread.java:138)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.os.Handler.dispatchMessage(Handler.java:102)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.os.Looper.loop(Looper.java:136)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.ActivityThread.main(ActivityThread.java:5026)
08-11 17:32:47.830: E/AndroidRuntime(750): at java.lang.reflect.Method.invokeNative(Native Method)
08-11 17:32:47.830: E/AndroidRuntime(750): at java.lang.reflect.Method.invoke(Method.java:515)
08-11 17:32:47.830: E/AndroidRuntime(750): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
08-11 17:32:47.830: E/AndroidRuntime(750): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
08-11 17:32:47.830: E/AndroidRuntime(750): at dalvik.system.NativeStart.main(Native Method)
08-11 17:32:47.830: E/AndroidRuntime(750): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
08-11 17:32:47.830: E/AndroidRuntime(750): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
08-11 17:32:47.830: E/AndroidRuntime(750): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
08-11 17:32:47.830: E/AndroidRuntime(750): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
08-11 17:32:47.830: E/AndroidRuntime(750): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.Activity.setContentView(Activity.java:1930)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
08-11 17:32:47.830: E/AndroidRuntime(750): at com.cp.app.MainActivity.onCreate(MainActivity.java:14)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.Activity.performCreate(Activity.java:5242)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
08-11 17:32:47.830: E/AndroidRuntime(750): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
08-11 17:32:47.830: E/AndroidRuntime(750): ... 11 more



joined on
December 28,2013
Replied on August 11,2014

I have faced the same situation and resolved it in this way.

Check AndroidManifest.xml and search for the line

<uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="21" />

Remove android:targetSdkVersion, it worked for me, you can also try.

<uses-sdk
        android:minSdkVersion="7" />

joined on
August 11,2014
Replied on August 11,2014

Thanks,

It worked for me too.

Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us