0

I have Eclipse Juno version using API level 20. When create a default project "Hello world" and try to start it on an emulator there is a problem

Unfortunately hello world has stopped

When I try to start one of the older/previous projects (made in older version of Eclipse and lower API) almost with all have the same problem, but a few previous projects it opens. I can't figure out where the problem could be. I set in manifest the minimum version to 8 and target version to 20.

Here is the log:

FATAL EXCEPTION: main  Process: com.example.zezanje, PID: 3481  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.zezanje/com.example.zezanje.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.      
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)  
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)    
at android.app.ActivityThread.access$800(ActivityThread.java:138)   
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)     
at android.os.Handler.dispatchMessage(Handler.java:102)     
at android.os.Looper.loop(Looper.java:136)      
at android.app.ActivityThread.main(ActivityThread.java:5026)    
at java.lang.reflect.Method.invokeNative(Native Method)     
at java.lang.reflect.Method.invoke(Method.java:515)     
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)      
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)     
at dalvik.system.NativeStart.main(Native Method)  Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.   
at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)    
at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)   
at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)     
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)    
at android.app.Activity.setContentView(Activity.java:1930)      
at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)     
at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)    
at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)   
at com.example.zezanje.MainActivity.onCreate(MainActivity.java:13)      
at android.app.Activity.performCreate(Activity.java:5242)   
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)      
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)   ... 11 more
Amsheer
  • 7,046
  • 8
  • 47
  • 81
user3572787
  • 41
  • 1
  • 7
  • check your emulator api level – prabhakaran Aug 04 '14 at 14:14
  • Emulator api level is set to 20. I have just that option for new sdk, and target version in manifest and project properties is set to 20. – user3572787 Aug 04 '14 at 14:16
  • 2
    possible duplicate of [android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar](http://stackoverflow.com/questions/24587218/android-util-androidruntimeexception-you-cannot-combine-swipe-dismissal-and-the) – Simon Aug 04 '14 at 14:19
  • 1
    Thanks you folks. The answer has been posted. That is correct answer for my problem also. It seems that there is problem with emulator at api level 20. Use api 19 ! – user3572787 Aug 04 '14 at 15:10

1 Answers1

1

It seams the problem is that you are trying to run a project developed for a platform before android L. I think that easiest solution is to install any android SDK version (before API20 and above 8 like API18) from the SDK manager and adjust the target version to it

Ahmed Daif
  • 379
  • 3
  • 12