Unsafe/unchecked operations? WTF?

Monkey Targets Forums/Android/Unsafe/unchecked operations? WTF?

GfK(Posted 2011) [#1]
Could compile for android perfectly well a few weeks ago when I last tried it. Now I'm getting an error with the simplest of programs:
Strict

'Import diddy
Import mojo

Function Main:Int()
	New myClass
	Return 0
End Function
	
Class myClass extends App
	Field time:Int
	
	Method OnCreate:Int()
		Self.time = 1'Millisecs()
'		For Local n:Int = 1 to 100000
'			Self.intToString(23462469)
'		Next
		Self.time = 1'Millisecs()-Self.time
		SetUpdateRate(30)
		Return 0
	End Method

	Method intToString:String(val:Int)
	'	Return EncodeBase64(val)
		Local result:String
'		result = String.FromChar((val Shr 24) & $FF)
'		result+= String.FromChar((val Shr 16) & $FF)
'		result+= String.FromChar((val Shr 8) & $FF)
'		result+= String.FromChar(val & $FF)
		Return result
	End Method
	
	Method OnUpdate:Int()
	End Method
	
	Method OnRender:Int()
		Cls
		DrawText(Self.time,50,50)
		Return 0
	End Method
End Class


As you can see, this code now does pretty much nothing, yet it refuses to compile, throwing an error every time:
compile:
[javac] C:\Program Files\Android\android-sdk\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 2 source files to C:\Users\Dave Kirk\Desktop\New folder\test.build\android\bin\classes
[javac] Note: C:\Users\Dave Kirk\Desktop\New folder\test.build\android\src\com\monkey\MonkeyGame.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

-post-compile:

-obfuscate:

-dex:
[echo] Converting compiled files and external libraries into C:\Users\Dave Kirk\Desktop\New folder\test.build\android\bin\classes.dex...
[apply] =C:\Users\Dave was unexpected at this time.
ERROR:
BUILD FAILED
C:\Program Files\Android\android-sdk\tools\ant\main_rules.xml:472: The following error occurred while executing this line:
C:\Program Files\Android\android-sdk\tools\ant\main_rules.xml:203: apply returned: 255

Total time: 2 secondsERROR:
Android build failed.
Error in compilation!

I have no idea what any of this means.


muddy_shoes(Posted 2011) [#2]
I'm guessing spaces in the directory names.


therevills(Posted 2011) [#3]
I'm guessing spaces in the directory names


Correct, you win the house :)

@Dave, since your Window's user name is "Dave Kirk" and you are running your code on your desktop your path includes a space... this is an Android bug, copy your "New folder" to C:\

Also the "unsafe" warning isnt the text you should be looking at its the "[apply] =C:\Users\Dave was unexpected at this time." :)


GfK(Posted 2011) [#4]
@Dave, since your Window's user name is "Dave Kirk" and you are running your code on your desktop your path includes a space... this is an Android bug, copy your "New folder" to C:\
Already tried that, got the same error. Though actually, there's still a space in New Folder....


therevills(Posted 2011) [#5]
D'oh... LOL!