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 trialSarha Bragança
3,721 PointsThe application crystal ball (process com.example.crystalball) has stopped unexpectedly. Please try again
The application crystal ball (process com.example.crystalball) has stopped unexpectedly. Please try again - Genymotion AVD This keeps happening all the time! It started right after I added ball01.png into the app! What should I do?
3 Answers
Jacob Boyer
1,618 PointsIt looks like a problem with the theme you set. But I'm no wizard.
Jacob Boyer
1,618 PointsSimply adding an image shouldn't cause a force close. Have you looked thru the logcat?
Sarha Bragança
3,721 PointsIt says: 06-09 17:58:07.430: E/AndroidRuntime(1489): FATAL EXCEPTION: main 06-09 17:58:07.430: E/AndroidRuntime(1489): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.crystalball/com.example.crystalball.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.os.Handler.dispatchMessage(Handler.java:99) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.os.Looper.loop(Looper.java:130) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.app.ActivityThread.main(ActivityThread.java:3683) 06-09 17:58:07.430: E/AndroidRuntime(1489): at java.lang.reflect.Method.invokeNative(Native Method) 06-09 17:58:07.430: E/AndroidRuntime(1489): at java.lang.reflect.Method.invoke(Method.java:507) 06-09 17:58:07.430: E/AndroidRuntime(1489): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 06-09 17:58:07.430: E/AndroidRuntime(1489): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 06-09 17:58:07.430: E/AndroidRuntime(1489): at dalvik.system.NativeStart.main(Native Method) 06-09 17:58:07.430: E/AndroidRuntime(1489): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 06-09 17:58:07.430: E/AndroidRuntime(1489): at com.example.crystalball.MainActivity.onCreate(MainActivity.java:16) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 06-09 17:58:07.430: E/AndroidRuntime(1489): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 06-09 17:58:07.430: E/AndroidRuntime(1489): ... 11 more 06-09 18:46:46.984: D/AndroidRuntime(1539): Shutting down VM 06-09 18:46:46.984: W/dalvikvm(1539): threadid=1: thread exiting with uncaught exception (group=0xb5f294f0) 06-09 18:46:46.994: E/AndroidRuntime(1539): FATAL EXCEPTION: main 06-09 18:46:46.994: E/AndroidRuntime(1539): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.crystalball/com.example.crystalball.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.os.Handler.dispatchMessage(Handler.java:99) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.os.Looper.loop(Looper.java:130) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.app.ActivityThread.main(ActivityThread.java:3683) 06-09 18:46:46.994: E/AndroidRuntime(1539): at java.lang.reflect.Method.invokeNative(Native Method) 06-09 18:46:46.994: E/AndroidRuntime(1539): at java.lang.reflect.Method.invoke(Method.java:507) 06-09 18:46:46.994: E/AndroidRuntime(1539): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 06-09 18:46:46.994: E/AndroidRuntime(1539): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 06-09 18:46:46.994: E/AndroidRuntime(1539): at dalvik.system.NativeStart.main(Native Method) 06-09 18:46:46.994: E/AndroidRuntime(1539): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 06-09 18:46:46.994: E/AndroidRuntime(1539): at com.example.crystalball.MainActivity.onCreate(MainActivity.java:16) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 06-09 18:46:46.994: E/AndroidRuntime(1539): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 06-09 18:46:46.994: E/AndroidRuntime(1539): ... 11 more
I don't know what tha is. What should I do?