Reputation: 1148
I'm new to android development, so I tried the first tutorial on android.com. The app I want to write for my HTC hero has android 2.1 eclair. So I made a new project with:
minimum sdk 2.0 eclair (API 5) <br>
target sdk 2.1 eclair (API 7) <br>
compile sdk 2.1 (API 7)
I used the command android to make the build.xml:
android update project --name MyFirstApp -- target 1 --path workspace\MyFirstApp
then I go to the root folder of the project and run ant debug. result:
-build setup:
Project target: Android 1.5 (que? I clearly configured 2.1, didn't I?) <br>
API level: 3
WARNING: Attribute minSdkVersion in AndroidManifest.xml(5) is higher than the project target API level(3) <br>
This warning would make sense if my target API was indeed API 3. This is definitly not the case since I clearly configured API 5 in eclipse. <br>
Ant continues and at the end, these errors kill it:
[aapt] C:\...\workspace\MyFirstApp\bin\AndroidManifest.xml:7: error: No resource found for attribute 'targetSdkVersion' in package 'android' <br>
[aapt] C:\...\workspace\MyFirstApp\bin\AndroidManifest.xml:7: error: No resource found for attribute 'allowBackup' in package 'android'
BUILD FAILED <br>
C:Program Files\eclipse\Android SDK\tools\ant\build.xml:645: The following error occurred while executing this line: <br>
C:Program Files\eclipse\Android SDK\tools\ant\build.xml:683: null returned: 1
Upvotes: 2
Views: 762
Reputation: 1148
Solved: I needed to choose my target a little bit more carefully. It targets a specific installed android version. Type android list targets for more info
Upvotes: 1