0

Ok, I'm building an android project with ant. I have built the project hundreds of times without an issue, but all of a sudden Ant is playing up, and I have no idea why (I haven't updated it in the last half hour that I have been building my project.)

It seems to be this javac statement:

<javac srcdir="./" classpath="../external-deps/OUYA/ouya-sdk.jar" />

When I remove it, it builds fine.

The error I'm getting is :

warning: 'includeantruntime' was not set defaulting to build.sysclasspath=last; set to false for repeatable builds

I have however set the includeantruntime value to false, and true , however when I do so it seems like ant is ignoring my Android libraries by throwing out this error constantly:

error: package android.content does not exist
error: package android.hardware.input does not exist
error: package android.util does not exist
etc.

So, I have no clue what's going on. Again, I haven't changed any configuration at all, it just sprung up on me.

I'm on a 32bit Ubuntu 13 machine. I have been playing with git, but I have checked all my files from a non git backup, and the files are identical.

Thanks for your time.

Here is my build.xml : http://pastebin.com/H5019R6E

1 Answers1

0

I can't see how would ever work, as you are not referencing any of the Androoid libraries in your build.xml.

Have a look in android-sdk/tools/ant/build.xml :

        <path id="project.javac.classpath">
            <path refid="project.all.jars.path" />
            <path refid="tested.project.classpath" />
            <path path="${java.compiler.classpath}" />
        </path>
        <javac encoding="${java.encoding}"
                source="${java.source}" target="${java.target}"
                debug="true" extdirs="" includeantruntime="false"
                destdir="${out.classes.absolute.dir}"
                bootclasspathref="project.target.class.path"
                verbose="${verbose}"
                classpathref="project.javac.classpath"
                fork="${need.javac.fork}">
            <src path="${source.absolute.dir}" />
            <src path="${gen.absolute.dir}" />
            <compilerarg line="${java.compilerargs}" />
        </javac>

You'd need to have at least the same in your build.xml.

I'd suggest that you don't define <javac />. If you have to, then follow the hint and "copy/paste the whole target" into build.xml and customize it.

But instead I'd just copy ouya-sdk.jar to the libs/ directory and it will be automatically included with the standard build.xml

Jacob Nordfalk
  • 3,533
  • 1
  • 21
  • 21
  • Thanks, that's what I am doing at the moment - keeping ouya-sdk.jar in libs folder. Funny how it was working , although, I never noticed any of the params you posted above. I'll take a look at the build.xml in the android dir. – Nathaniel Bennett Sep 08 '13 at 22:38