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 Build a Simple Android App (retired 2014) Pretty Little Things Adding an Image

How can I do this with Android Studio and I It show s error like Unfortunately Stopped Apllication error while I run app

I had tried following code in androidstudio.(and I tried also in Eclipse IDE)

My minimum required

sdk : API 8:Android 2.2 froyo, taget sdk : API 19:Android 4.4 KitKat, Compile With : API 19:Android 4.4 KitKat, Langauge Level:6.0-ovrrride in interface, Theme:Holo Light With Dark Action Bar. Then in activity_main.xml code is below:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context="com.example.crystal.app.MainActivity">

<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/imageView" android:layout_alignParentLeft="true" android:src="@drawable/ddd" />

Where I set theme as Theme.Black.NoTitleBar.Fullscreen.

and I changed AndroidManifest.xml code is below:

<?xml version="1.0" encoding="utf-8"?>

<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.crystal.app.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>

</application>

Then I run the Application in AVD but when I open Application it shows the error like "Unfortunately,(app name) has Stopped (and OK button)" So ,What is wrong with my code.