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 trialohad shaboody
195 Pointsi cant run my avd
i tried to change the details that the teacher tolled to change after the note and still can't run the app
4 Answers
Ben Jakuben
Treehouse TeacherDoes your emulator run at all? Do you get any kind of error messages in the Console or Logcat tabs in Eclipse?
ohad shaboody
195 Pointswow its you from the movie, lol!! well, my emulator ran perfect until the part of the image.(btw - im sorry for the bad english...) i tried to change the things in the xml that was written below the film, but there is still an error. and yes im getting an error messages in the logcat:
04-22 08:41:26.053: D/AndroidRuntime(1782): Shutting down VM 04-22 08:41:26.053: W/dalvikvm(1782): threadid=1: thread exiting with uncaught exception (group=0xb1a81ba8) 04-22 08:41:26.153: E/AndroidRuntime(1782): FATAL EXCEPTION: main 04-22 08:41:26.153: E/AndroidRuntime(1782): Process: com.example.freeapp, PID: 1782 04-22 08:41:26.153: E/AndroidRuntime(1782): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.freeapp/com.example.freeapp.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.app.ActivityThread.access$800(ActivityThread.java:135) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.os.Handler.dispatchMessage(Handler.java:102) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.os.Looper.loop(Looper.java:136) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.app.ActivityThread.main(ActivityThread.java:5017) 04-22 08:41:26.153: E/AndroidRuntime(1782): at java.lang.reflect.Method.invokeNative(Native Method) 04-22 08:41:26.153: E/AndroidRuntime(1782): at java.lang.reflect.Method.invoke(Method.java:515) 04-22 08:41:26.153: E/AndroidRuntime(1782): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 04-22 08:41:26.153: E/AndroidRuntime(1782): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 04-22 08:41:26.153: E/AndroidRuntime(1782): at dalvik.system.NativeStart.main(Native Method) 04-22 08:41:26.153: E/AndroidRuntime(1782): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98) 04-22 08:41:26.153: E/AndroidRuntime(1782): at com.example.freeapp.MainActivity.onCreate(MainActivity.java:15) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.app.Activity.performCreate(Activity.java:5231) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 04-22 08:41:26.153: E/AndroidRuntime(1782): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159) 04-22 08:41:26.153: E/AndroidRuntime(1782): ... 11 more 04-22 08:41:30.733: I/Process(1782): Sending signal. PID: 1782 SIG: 9
Ben Jakuben
Treehouse TeacherHaha - we love supporting our students! Okay, this is a tricky spot. The tools changed recently and we need to do this workaround. I'm going to refresh the entire course next to overcome these issues.
Until then...it looks like you are still using the wrong theme in your manifest. Can you paste in the code from your AndroidManifest.xml file?
ohad shaboody
195 Pointssure, but notice that instead of calling the app "crystalBall" i called it "free app" dont know why did it...
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.freeapp" android:versionCode="1" android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
<activity
android:name="com.example.freeapp.MainActivity"
android:label="@string/app_name" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Ben Jakuben
Treehouse TeacherOkay, so this is the line that is giving you trouble:
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
You need to undo that change and go back to AppTheme that we saw in the video before making this change. You can use the Manifest wizard to change the theme instead of editing the XML directly.
Sorry for the confusion - this is an annoying issue!
ohad shaboody
195 Pointsthnx alot, it works perfect now:)