Build failed - Monkey 73b - Solved

Monkey Targets Forums/Android/Build failed - Monkey 73b - Solved

Sensei(Posted 2013) [#1]
Hi guys,
I was busy doing some light coding on my game and it compiles and runs fine in HTML5. I thought I'd give it a quick go on my Ouya, which compiled fine just a week ago, but I got this build failed error:
...
BUILD FAILED
C:\adt-bundle-windows-x86-20130729\sdk\tools\ant\build.xml:712: The following error occurred while executing this line:
C:\adt-bundle-windows-x86-20130729\sdk\tools\ant\build.xml:726: Compile failed; see the compiler error output for details.
...

There are 100 errors so it's a bit insane to paste here, but it seems to look like HTML errors for example:
 [javac] C:\MonkeyPro73b\bananas\mak\joytest\joytest.build\android_ouya.bak\src\com\monkeycoder\monkeygame\MonkeyGame.java:800: error: '(' expected
    [javac]         <li class="features"><a href="/features">Features</a></li>

I then thought, fine, let me delete the build folder and also try it using an example piece of code. I get the same results each time.
So I thought I'd have a look at the Android SDK Manager, and there were two updates: Android SDK Tools and Android 4.3 SDK Platform. I thought I'd play it safe and update those.

Still, no luck. Looking at the build.xml file where the errors are occurring, this is the snippet of code:
<target name="-compile" depends="-pre-build, -build-setup, -code-gen, -pre-compile">
        <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping...">
            <!-- merge the project's own classpath and the tested project's classpath -->
            <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>
...



Sensei(Posted 2013) [#2]
A thought just occurred to me. I recently took the latest Git files and copied only "some" of them over my existing install. I think that was a bad idea as I suspect that's the cause of my errors.
When I get home from work, I'll restore to what I had before, and if all else fails, just start a fresh clean monkey install, as I suspect that to be the reason it's not compiling to the Ouya.


Sensei(Posted 2013) [#3]
Got this sorted by making sure the ouya target.monkey file had #TARGET_BUILDER="android" instead of #TARGET_BUILDER="ouya" as previously mentioned in another post.