I didn't even >>mention<< Eclipse. Use the android tool to set up your
ant project -- it knows how to set up for the android Ant tasks.

They will, of course, need the SDK, but they will NOT need Eclipse. I
do not build (nor do I recommend building) my product for distribution
with Eclipse.

On Apr 25, 9:48 pm, veradis tech <[email protected]> wrote:
> Thanks Bob Kerns.
> My aim is to make the code available for all. I will move the source to SVN,
> and anyone can download/update it and compile it using ANT. I don't want to
> use eclipse for this.
>
> Thanks
> Veradis
>
>
>
> On Sat, Apr 24, 2010 at 9:12 PM, Bob Kerns <[email protected]> wrote:
> > Your build.xml doesn't look anything at all like what's generated by
> > the 'android' tool. It looks like you've undergone a major manual
> > effort, instead.
>
> > Why not just use the android tool to set up your project?
>
> >http://developer.android.com/intl/de/guide/developing/other-ide.html
>
> > You can create a blank project, and edit the build.xml and such if you
> > want.
>
> > As far as I know, the android tool is the only thing that knows what
> > the requirements are for the various android ant tasks. I suspect one
> > requirement is that sdk.dir be set to point to the sdk.
>
> > On Apr 24, 12:57 am, veradis <[email protected]> wrote:
> > > Hi,
>
> > >  I want to compile my Android APP using ANT in windows. I placed
> > > build.xml in project root and included necessary jars in project lib
> > > folder. I had made proper configurations for ant also, but its not
> > > working. Please help me on this.
>
> > > Error
> > > ====
>
> > > C:\Documents and Settings\nav\workspace\YumFlixMobile>ant
> > > Buildfile: C:\Documents and Settings\nav\workspace\YumFlixMobile
> > > \build.xml
>
> > > clean:
>
> > > resource-src:
>
> > > BUILD FAILED
> > > C:\Documents and Settings\nav\workspace\YumFlixMobile\build.xml:33:
> > > java.lang.Nu
> > > llPointerException
> > >         at
> > > com.googlecode.androidant.AndroidTools.locateTool(AndroidTools.java:8
> > > 1)
> > >         at
> > > com.googlecode.androidant.AndroidTools.startTool(AndroidTools.java:74
> > > )
> > >         at
> > > com.googlecode.androidant.AndroidTools.startTool(AndroidTools.java:62
> > > )
> > >         at
> > > com.googlecode.androidant.WindowsAndroidTools.aapt(WindowsAndroidTool
> > > s.java:36)
> > >         at aapt.main(aapt.java:7)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >         at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:39)
> > >         at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > sorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
> > >         at
> > > org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:15
> > > 2)
> > >         at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
> > >         at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:
> > > 221)
> > >         at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:
> > > 135)
> > >         at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
> > >         at
> > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> > >         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> > >         at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > sorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
> > > a:106)
> > >         at org.apache.tools.ant.Task.perform(Task.java:348)
> > >         at
> > > org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
> > >         at
> > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >         at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:39)
> > >         at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > sorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
> > > a:106)
> > >         at org.apache.tools.ant.Task.perform(Task.java:348)
> > >         at
> > > org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
> > > a:398)
> > >         at
> > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
> > >         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >         at
> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > java:39)
> > >         at
> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > sorImpl.java:25)
> > >         at java.lang.reflect.Method.invoke(Method.java:597)
> > >         at
> > > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
> > > a:106)
> > >         at org.apache.tools.ant.Task.perform(Task.java:348)
> > >         at org.apache.tools.ant.Target.execute(Target.java:390)
> > >         at org.apache.tools.ant.Target.performTasks(Target.java:411)
> > >         at
> > > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
> > >         at org.apache.tools.ant.Project.executeTarget(Project.java:
> > > 1329)
> > >         at
> > > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
> > > cutor.java:41)
> > >         at org.apache.tools.ant.Project.executeTargets(Project.java:
> > > 1212)
> > >         at org.apache.tools.ant.Main.runBuild(Main.java:801)
> > >         at org.apache.tools.ant.Main.startAnt(Main.java:218)
> > >         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
> > >         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:
> > > 109)
>
> > > Total time: 1 second
>
> > > =====================================================================
>
> > > build.xml
> > > =======
>
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <project name="YumFlixMobile" default="precommit"
> > > xmlns:android="antlib:com.googlecode.androidant">
>
> > >         <!-- Requires ant 1.7 or better -->
>
> > >         <property environment="env"/>
> > >         <condition property="android-home" value="$
> > > {env.ANDROID_HOME}">
> > >                 <isset property="env.ANDROID_HOME"/>
> > >         </condition>
>
> > >         <property name="android-ant.jar" location="lib/android-
> > > ant.jar"/>
> > >         <taskdef uri="antlib:com.googlecode.androidant"
> > >                 resource="com/googlecode/androidant/antlib.xml"
> > > classpath="${android-ant.jar}"/>
>
> > >         <!-- Dependencies -->
>
> > >         <fileset dir="lib" id="main.jars">
> > >                 <include name="positron.jar"/>
> > >         </fileset>
>
> > >         <fileset dir="lib" id="test.jars">
> > >                 <include name="positron.jar"/>
> > >                 <include name="junit.jar"/>
> > >         </fileset>
>
> > >         <!-- Rules -->
>
> > >         <target name="clean" description="Delete the output
> > > directories.">
> > >                 <delete dir="target"/>
> > >         </target>
>
> > >         <target name="resource-src" description="Generate the R.java
> > > file for this project's resources.">
> > >                 <android:aapt>
> > >                         <arg value="package"/>
> > >                         <arg value="-m"/>
> > >                         <arg value="-J"/>
> > >                         <arg file="src"/> <!-- Create R.java in the
> > > source directory -->
> > >                         <arg value="-M"/>
> > >                         <arg file="AndroidManifest.xml"/>
> > >                         <arg value="-S"/>
> > >                         <arg file="res"/>
> > >                         <arg value="-I"/>
> > >                         <arg file="${android-home}/android.jar"/>
> > >                 </android:aapt>
> > >         </target>
>
> > >         <target name="compile-main" depends="resource-src"
> > > description="Compile the java source.">
> > >                 <mkdir dir="target/main-classes"/>
> > >                 <javac encoding="ascii" target="1.5" debug="true"
> > > extdirs=""
> > >                                 srcdir="."
> > >                                 destdir="target/main-classes"
> > >                                 bootclasspath="${android-home}/
> > > android.jar">
> > >                         <classpath>
> > >                                 <fileset refid="main.jars"/>
> > >                         </classpath>
> > >                 </javac>
> > >         </target>
>
> > >         <target name="dex" depends="compile-main" description="Convert
> > > the .class files into .dex files.">
> > >                 <property name="classes.dex" location="target/
> > > classes.dex"/>
> > >                 <android:dx inputref="main.jars">
> > >                         <arg value="--dex"/>
> > >                         <arg value="--output=${classes.dex}"/>
> > >                         <arg path="target/main-classes"/>
> > >                 </android:dx>
> > >         </target>
>
> > >         <target name="package-res" description="Put the project's
> > > resources into the output package file.">
> > >                 <android:aapt>
> > >                         <arg value="package"/>
> > >                         <arg value="-f"/>
> > >                         <arg value="-M"/>
> > >                         <arg file="AndroidManifest.xml"/>
> > >                         <arg value="-S"/>
> > >                         <arg file="res"/>
> > >                         <!-- No assets directory -->
> > >                         <arg value="-I"/>
> > >                         <arg file="${android-home}/android.jar"/>
> > >                         <arg value="-F"/>
> > >                         <arg file="target/notepad.ap_"/>
> > >                 </android:aapt>
> > >         </target>
>
> > >         <target name="package-apk" depends="dex, package-res"
> > > description="Package the application and sign it with a debug key.">
> > >                 <android:apk-builder>
> > >                         <arg file="target/notepad.apk"/>...
>
> read more »

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to