Help. Error on building on line 679 build.xml

Monkey Targets Forums/Android/Help. Error on building on line 679 build.xml

ondesic(Posted 2012) [#1]
I feel like I am pretty close to getting a working program. When I run my program, it gets all the way to compile, then gives me an error:

BUILD FAILED
C:\Development\Android_SDK\tools\ant\build.xml:679: The following error occurred while executing this line:
C:\Development\Android_SDK\tools\ant\build.xml:692: Compile failed; see the compiler error output for details.

Total time: 2 seconds
TRANS FAILED: Android build failed.

I looked at these lines in the xml and it didn't seem to help.
Any ideas?


ondesic(Posted 2012) [#2]
No one has had this problem before?


therevills(Posted 2012) [#3]
Was there any more info on the console? Maybe paste the entire log here.


MikeHart(Posted 2012) [#4]
Do you get this with every example in the bananas folder?


AdamRedwoods(Posted 2012) [#5]
ant may not be finding your java compiler, or wrong version of compiler. i'd also keep your folder names all lowercase and without spaces.


therevills(Posted 2012) [#6]
This error also pops up if you are using native code without an extra carriage return at the end of the external file.

We really need to see more of the log to help.


ondesic(Posted 2012) [#7]
Here is the whole log:

D:_My_ProgramsProgrammingMonkeyPro64bMonkeyPro64bbintrans_winnt.exe -run -config=debug -target=android "C:UsersJ-AsusDocumentsMonkeyKKkk.monkey"
TRANS monkey compiler V1.40
Parsing...
UTF-8 Fail!
UTF-8 Fail!
UTF-8 Fail!
UTF-8 Fail!
UTF-8 Fail!
UTF-8 Fail!
UTF-8 Fail!
UTF-8 Fail!
UTF-8 Fail!
Semanting...
Translating...
Building...
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Buildfile: C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidbuild.xml

-check-env:
[checkenv] Android SDK Tools Revision 20.0.1
[checkenv] Installed at C:DevelopmentAndroid_SDK

-setup:
[echo] Project Name: MonkeyGame
[gettype] Project Type: Application

-pre-clean:

clean:
[delete] Deleting directory C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidbin
[delete] Deleting directory C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidgen
[getlibpath] Library dependencies:
[getlibpath] No Libraries
[subant] No sub-builds to iterate on

BUILD SUCCESSFUL
Total time: 0 seconds
Buildfile: C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidbuild.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 20.0.1
[checkenv] Installed at C:DevelopmentAndroid_SDK

-setup:
[echo] Project Name: MonkeyGame
[gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-build-setup:
[echo] Resolving Build Target for MonkeyGame...
[gettarget] Project Target: Android 3.2
[gettarget] API level: 13
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidbin
[mkdir] Created dir: C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidbinres
[mkdir] Created dir: C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidgen
[mkdir] Created dir: C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidbinclasses
[echo] ----------
[echo] Resolving Dependencies for MonkeyGame...
[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

-pre-build:

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
[javac] Compiling 3 source files to C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidbinclasses
[javac] C:UsersJ-AsusDocumentsMonkeyKKkk.buildandroidsrccommonkeyMonkeyGame.java:2419: class, interface, or enum expected
[javac] }import android.os.Build;
[javac] ^
[javac] 1 error

BUILD FAILED
C:DevelopmentAndroid_SDKtoolsantbuild.xml:679: The following error occurred while executing this line:
C:DevelopmentAndroid_SDKtoolsantbuild.xml:692: Compile failed; see the compiler error output for details.

Total time: 5 seconds
TRANS FAILED: Android build failed.
Abnormal program termination. Exit code: -1


therevills(Posted 2012) [#8]
You are using an extern file and it doesn't have a carriage return at the end of the file.

}import android.os.Build;

^ the brace must have a CR at the end...


ondesic(Posted 2012) [#9]
There was already a CR there, but I added another one. It worked, but I am VERY confused. Doesn't Monkey supposed to create the .Java file automatically? How can I make sure this doesn't happen again?

Thanks!


therevills(Posted 2012) [#10]
Monkey appends the external java to the generated java, just make sure you have a couple or CRs in your externs.