0

I downloaded Android Studio this morning. I have a background in Java, and I have professionally developed in PHP+Mysql+Jquery. I'm following android developers tutorial, but when I created the first project (i guess it's supossed to be a 100% functionally Hello World), and setted up an AVD emulator.

But when I run the new project it throws me a FATAL ERROR with the next log:

08-22 15:39:04.970      833-833/picacodigo.prueba3 D/dalvikvm﹕ Not late-enabling CheckJNI (already on)
08-22 15:39:05.480      833-833/picacodigo.prueba3 D/AndroidRuntime﹕ Shutting down VM
08-22 15:39:05.480      833-833/picacodigo.prueba3 W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xb2abdd70)
08-22 15:39:05.500      833-833/picacodigo.prueba3 E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: picacodigo.prueba3, PID: 833
    java.lang.RuntimeException: Unable to start activity ComponentInfo{picacodigo.prueba3/picacodigo.prueba3.prueba3}: 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 picacodigo.prueba3.prueba3.onCreate(prueba3.java:14)
    at android.app.Activity.performCreate(Activity.java:5242)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
    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)

I have not edited the default code created by Android Studio

Lal
  • 14,726
  • 4
  • 45
  • 70
VictorArcas
  • 630
  • 2
  • 7
  • 23

1 Answers1

0

Change your target sdk version to 19

check here targetSdkVersion setting

Do not use API Level of 20 and Platform 4.4W, as Android Virtual Device. With Level 19 and Platform 4.2.2 set on AVD everything runs as it should.

Community
  • 1
  • 1
Lal
  • 14,726
  • 4
  • 45
  • 70