0

I compile android project through "ant debug".(http://developer.android.com/training/basics/firstapp/starting-activity.html)**

...
-build-setup:
     [echo] Resolving Build Target for MyFirstApp...
[gettarget] Project Target:   Android 2.3.3
[gettarget] API level:        10
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: D:\myproj\android\MyFirstApp\bin
    [mkdir] Created dir: D:\myproj\android\MyFirstApp\bin\res
    [mkdir] Created dir: D:\myproj\android\MyFirstApp\gen
    [mkdir] Created dir: D:\myproj\android\MyFirstApp\bin\classes
    [mkdir] Created dir: D:\myproj\android\MyFirstApp\bin\dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for MyFirstApp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

I found the annotations.jar under ${sdk}\tools\support and trace the build.xml under ${sdk}\tools\ant\build.xml hereunder

<echo level="info">Resolving Dependencies for ${ant.project.name}...</echo>
        <dependency
                libraryFolderPathOut="project.library.folder.path"
                libraryPackagesOut="project.library.packages"
                libraryManifestFilePathOut="project.library.manifest.file.path"
                libraryResFolderPathOut="project.library.res.folder.path"
                libraryBinAidlFolderPathOut="project.library.bin.aidl.folder.path"
                libraryRFilePathOut="project.library.bin.r.file.path"
                libraryNativeFolderPathOut="project.library.native.folder.path"
                jarLibraryPathOut="project.all.jars.path"
                targetApi="${project.target.apilevel}"
                verbose="${verbose}" />

HOW TO ADD annotation.jar TO THE CLASSPATH? PS:I have added annontation.jar under D:\myproj\android\MyFirstApp\libs,But still report that message.

Harshad Pansuriya
  • 20,189
  • 8
  • 67
  • 95

1 Answers1

0

In your Android manifest xml change the minimum SDK Version it requires API Level 15

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

to

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

Because the dependecy is API level 15

Venkatesh S
  • 5,466
  • 1
  • 25
  • 30
  • Thank you for your reply. Yesterday, I had changed the target=android-10 in project.properties to 17 and changed the minSdkVersion=17 It was SUCCESSFUL. But how wl it be ok under android-10?(I want to make it run under 2.3.3) – user2029088 Feb 01 '13 at 02:19