8.2.11

An SDK Target must be specified when you try to create a new Android Project in Eclipse

image

This is caused by the SDK path not being set in the Eclipse IDE. This is resolved by selecting Window—>Preferences—>Android and enter the path to your Android SDK, then hit OK. You will see a list of all your Android Platforms as shown below:

image

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


   2:  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"


   3:      android:orientation="vertical" android:layout_width="fill_parent"


   4:      android:layout_height="fill_parent">


   5:      <TextView android:layout_width="fill_parent"


   6:          android:layout_height="wrap_content" android:text="@string/hello" />


   7:      <EditText android:id="@+id/editText1" android:layout_height="wrap_content"


   8:          android:layout_width="fill_parent" android:autoText="false"></EditText>


   9:      <Button android:layout_height="wrap_content"    


  10:          android:layout_width="wrap_content" android:id="@+id/button1"


  11:          android:text="save note"


  12:          android:onClick="saveNote"


  13:          ></Button>


  14:  </LinearLayout>


No comments: