• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

android update project --path . -target android-3

allycavs

Lurker
Nov 22, 2011
1
0
Hey Guys,

I have a basic android project put together. all works fine and can deploy to emulator and a actual android phone.

But I am now looking to customize the build so I run
Code:
android update project --path . -target android-3

This works fine. A build.xml and the local.properties are successfully created. local.properties points at the android SDK. (FYI the sdk is in Program Files folder in windows XP)

Anyway when I attempt to build (ant debug, ant release) I always get the same error:
Code:
F:\Program Files\Android\android-sdk\tools\ant\build.xml:65: taskdef A class needed by class com.android.ant.NewSetupTask cannot be found: com/android/sdklib/ISdkLog

Now looking at the build.xml created in the project file I do not see anything that adds android jars onto the ant classpath. looking round the internet it is assumed the generated build.xml will have something to the effect of

Code:
 <!-- Custom Android task to deal with the project target, and import the proper rules.
         This requires ant 1.6.0 or above. -->
    <path id="android.antlibs">
        <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
        <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
        <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
        <pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" />
        <pathelement path="${sdk.dir}/tools/lib/jarutils.jar" />
    </path>

NOTE: the missing class is actually in sdklib.jar and i am using ANT 1.6.5

Any ideas. I dont add the path in myself do I?

Alan
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones