views:

533

answers:

2

I am just beginning to use Eclipse for Android applications. I have installed Eclipse 3.5.2 and Java 5 AVD is Android 2.1 API 7

My initial Hello Android program ran fine but will not run again.

getting the following error:

[2010-07-25 09:47:31 - HelloAndroid] WARNING: Application does not specify an API level requirement!
[2010-07-25 09:47:31 - HelloAndroid] Device API version is 7 (Android 2.1-update1)

searched the forums but could only find a refernece to manifest file to be sure following was set:

<uses-sdk android:minSdkVersion="3" />

my manifest file does not contain that line:

 <?xml version="1.0" encoding="utf-8" ?> 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.helloandriod" android:versionCode="1" android:versionName="1.0">
     <application android:icon="@drawable/icon" android:label="@string/app_name">
         <activity android:name=".HelloAndroid" 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>
  </manifest>

I have checked the adv mgr and it is set to 7 In Eclipse i went to properties -> Android and set it to 7

get same warnings

+5  A: 

Well, if Eclipse is, for whatever reason, not generating that line for you, by all means you can add it yourself.

Add the line:
<uses-sdk android:minSdkVersion="3" />

to your manifest, right before the ending manifest tag.

nicholas.hauschild
Also make sure to read exactly what the impact of setting the various `<uses-sdk>` tags is: http://developer.android.com/guide/publishing/versioning.html#minsdkversion
Christopher
+2  A: 

You should also include

<uses-sdk android:minSdkVersion="7" />

in your manifest file, if it is not already there. It's not clear from your question, but seems that it isn't.

For future reference about API levels, see this page

chrisbunney
Thanks for input.For anyone else reading this I put in the two src commands manually and Eclipse does not like manual input. Said is was out of sync.But i was able to update the manifest within Eclipse.It runs with no errors now but avd comes up with date and time only.I will figure it out but at least no errors . Thanks
Trent