Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Richard Luick
Richard Luick
10,955 Points

Unfortunately Crystal Ball has Stopped

Hello, I had been working on the Crystal Ball project for some time (up to the animation section) but an issue with my computer caused me to lose all the data associated with my application as well as eclipse and java. Since I wasn't terribly far I decided I would regroup and start again once I sorted out my computer. I am on the first step of the project which was simply changing the text to "The answer is YES" and I experience the error, "Unfortunately Crystal Ball has Stopped" when I boot it up in the emulator. Any help solving this is appreciated. I haven't been able to find a solution online thus far. My logcat text is below.

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

2 Answers

I got the same problem, except my computer been fine...

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Can you paste in the contents of your AndroidManifest.xml file? This issue can appear when you accidentally try to target an Android Wear app.

To paste in code, add three backticks on the lines before and after it. I can reformat it if need be.

```

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" ...

```

Richard Luick
Richard Luick
10,955 Points

Hi Ben, I was actually able to figure this one out although for the life of me I cannot remember exactly what I did to fix it. I was able to get my app running back to normal but I will paste the manifest below in case I am still missing something. Thanks for the response!

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.crystalball"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="Crystal Ball"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.crystalball.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="CrystalBall" android:exported="true" android:immersive="true"></activity>
    </application>

</manifest>