unfortunately app has stopped android development

+1 Rehman . · October 29, 2014
Hello everyone i am just a beginner of android app development, when we creat project we have a default activity of hello world on the front i just wanted to run that activity on emulator for that when i creat avd everything goes fine till then but when i run the app and wait to load everything goes fine on the console as well but at the end when its time to get displayed on the emulator error appears "unfortunately your app 'myfirstapp' has stopped unexpectedly"  here are the log cat

10-29 15:39:49.990: E/AndroidRuntime(964): FATAL EXCEPTION: main
10-29 15:39:49.990: E/AndroidRuntime(964): Process: com.example.firstandroidapp, PID: 964
10-29 15:39:49.990: E/AndroidRuntime(964): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.firstandroidapp/com.example.firstandroidapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.ActivityThread.access$800(ActivityThread.java:138)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.os.Handler.dispatchMessage(Handler.java:102)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.os.Looper.loop(Looper.java:136)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.ActivityThread.main(ActivityThread.java:5026)
10-29 15:39:49.990: E/AndroidRuntime(964): at java.lang.reflect.Method.invokeNative(Native Method)
10-29 15:39:49.990: E/AndroidRuntime(964): at java.lang.reflect.Method.invoke(Method.java:515)
10-29 15:39:49.990: E/AndroidRuntime(964): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
10-29 15:39:49.990: E/AndroidRuntime(964): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
10-29 15:39:49.990: E/AndroidRuntime(964): at dalvik.system.NativeStart.main(Native Method)
10-29 15:39:49.990: E/AndroidRuntime(964): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
10-29 15:39:49.990: E/AndroidRuntime(964): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:277)
10-29 15:39:49.990: E/AndroidRuntime(964): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2889)
10-29 15:39:49.990: E/AndroidRuntime(964): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3154)
10-29 15:39:49.990: E/AndroidRuntime(964): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:305)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.Activity.setContentView(Activity.java:1930)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
10-29 15:39:49.990: E/AndroidRuntime(964): at com.example.firstandroidapp.MainActivity.onCreate(MainActivity.java:14)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.Activity.performCreate(Activity.java:5242)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
10-29 15:39:49.990: E/AndroidRuntime(964): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
10-29 15:39:49.990: E/AndroidRuntime(964): ... 11 more
10-29 15:44:50.350: I/Process(964): Sending signal. PID: 964 SIG: 9

Post a Reply

Replies

Oldest  Newest  Rating
0 Alex Sweps · October 29, 2014
This is your error thats causing it:
ComponentInfo{com.example.firstandroidapp/com.example.firstandroidapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar


If you are using Platform 4.4W, set your min sdk to 19. You can do that in the manifest. 

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />


Alternatively you can change to a theme that does not use the action bar. In your XMLs graphical layout up the top there is a dropdown for themes. 

/images/forum/upload/2014-10-29/756502c5e1a53783f2682f065f733415.jpg


Let me know if you get stuck. Android can be a real pain to begin with.
0 Rehman . · October 30, 2014
Thanks for replying Alex, i have changed the theme to "theme.black" but the error is same i cant set target api to level 19 because i have to download it and internet is just too slow to download it :/ can we do something with this theme thing ?
0 Rehman . · October 30, 2014
and i would like to ask, is there any compatibility issue of eclipse with jdk or jre 8 ? do we need to install the previous version of jre ??
and one more thing why we are prompting to use old level of API, if it is so it means we cant build any app for latest android phones ? which has 1 revision level
0 Rehman . · October 30, 2014
i have just managed to download the api level 15(icecream sandwich 4.0.3) but suddenly there are lot bunch of errors on the console and problem tab, i dont know what to do 
here is the pic kindly tell me if you know how to sort it out
/images/forum/upload/2014-10-30/eefe53f1398820275df63773e1b3d9da.jpg
0 Alex Sweps · October 31, 2014
Fckin Android!! Looks like the appcompat is not compatible with the older api...  And yeah im not sure wtf google are doing but they seem to be making it real hard to start a project lately. 

I cant really help more but if that was me id just find some faster Internet and get api 19. 
0 Rehman . · October 31, 2014
okay i am now downloading the api level 19, some one told me that api's revision level do matter in app running on emulator and now we need more than rev 2 to have any activity on emulator now lets try on api level 19 it has more than 2 rev level, i'll tell you if it get right otherwise iam gona make it right :)
0 Rehman . · November 3, 2014
Yes i have the treatment! Sorry for posting it late but i have found the solution at least it worked for my machine,
all problem is with emulator and yes the revision level do matter....we need more than 2 revision level and GOOGLE API will help you to sort it out....and its API level 19 which works because it has google api :) thanks for your answers too it helped me alot 
  • 1

Java / Android Development

107,196 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator