Problem building Android Game.
Monkey Forums/Monkey Bug Reports/Problem building Android Game.
| ||
after updating monkey and java and android sdk i get this error when building. BUILD FAILED C:\Android\tools\ant\build.xml:710: The following error occurred while executing this line: C:\Android\tools\ant\build.xml:723: Compile failed; see the compiler error output for details. Any ideas or a fix. |
| ||
Need more info... paste the entire log. |
| ||
"C:/MonkeyPro/bin/transcc_winnt" -target=Android_Game -config=Debug -run "C:/Users/Elliot/SkyDrive/Game Projects/TinyTails/TinyTails.monkey" TRANS monkey compiler V1.46 Parsing... Semanting... Translating... Building... Buildfile: C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\build.xml -check-env: [checkenv] Android SDK Tools Revision 21.1.0 [checkenv] Installed at C:\Android -setup: [echo] Project Name: MonkeyGame [gettype] Project Type: Application -pre-clean: clean: [delete] Deleting directory C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\bin [delete] Deleting directory C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\gen [getlibpath] Library dependencies: [getlibpath] No Libraries [subant] No sub-builds to iterate on BUILD SUCCESSFUL Total time: 1 second Picked up _JAVA_OPTIONS: -Xmx512M Buildfile: C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\build.xml -set-mode-check: -set-debug-files: -check-env: [checkenv] Android SDK Tools Revision 21.1.0 [checkenv] Installed at C:\Android -setup: [echo] Project Name: MonkeyGame [gettype] Project Type: Application -set-debug-mode: -debug-obfuscation-check: -pre-build: -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:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\bin [mkdir] Created dir: C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\bin\res [mkdir] Created dir: C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\gen [mkdir] Created dir: C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\bin\classes [mkdir] Created dir: C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\bin\dexedLibs [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 -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:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\bin\classes [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1473: error: duplicate class: com.monkey.MonkeyGame [javac] public class MonkeyGame extends Activity { [javac] ^ [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1767: error: cannot find symbol [javac] MonkeyGame.view.postDelayed( this,(long)updatePeriod ); [javac] ^ [javac] symbol: variable view [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1781: error: cannot find symbol [javac] MonkeyGame.app.InvokeOnUpdate(); [javac] ^ [javac] symbol: variable app [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1793: error: cannot find symbol [javac] MonkeyGame.view.requestRender(); [javac] ^ [javac] symbol: variable view [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1798: error: cannot find symbol [javac] MonkeyGame.view.postDelayed( this,delay>0 ? delay : 0 ); [javac] ^ [javac] symbol: variable view [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1824: error: cannot find symbol [javac] MonkeyGame.view.postDelayed( this,0 ); [javac] ^ [javac] symbol: variable view [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1829: error: cannot find symbol [javac] AlertDialog.Builder db=new AlertDialog.Builder( MonkeyGame.activity ); [javac] ^ [javac] symbol: variable activity [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1854: error: cannot find symbol [javac] MonkeyGame.app=this; [javac] ^ [javac] symbol: variable app [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1970: error: cannot find symbol [javac] SharedPreferences prefs=MonkeyGame.activity.getPreferences( 0 ); [javac] ^ [javac] symbol: variable activity [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1975: error: cannot find symbol [javac] SharedPreferences prefs=MonkeyGame.activity.getPreferences( 0 ); [javac] ^ [javac] symbol: variable activity [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:1983: error: cannot find symbol [javac] return MonkeyData.loadString( path ); [javac] ^ [javac] symbol: variable MonkeyData [javac] location: class gxtkApp [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2090: error: cannot find symbol [javac] if( vbo_seq!=MonkeyGame.app.seq ){ [javac] ^ [javac] symbol: variable app [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2092: error: cannot find symbol [javac] vbo_seq=MonkeyGame.app.seq; [javac] ^ [javac] symbol: variable app [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2230: error: cannot find symbol [javac] bitmap=MonkeyData.loadBitmap( path ); [javac] ^ [javac] symbol: variable MonkeyData [javac] location: class gxtkGraphics [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2819: error: cannot find symbol [javac] SensorManager sensorManager=(SensorManager)MonkeyGame.activity.getSystemService( Context.SENSOR_SERVICE ); [javac] ^ [javac] symbol: variable activity [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2857: error: cannot find symbol [javac] InputMethodManager mgr=(InputMethodManager)MonkeyGame.activity.getSystemService( Context.INPUT_METHOD_SERVICE ); [javac] ^ [javac] symbol: variable activity [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2858: error: cannot find symbol [javac] mgr.showSoftInput( MonkeyGame.view,0 );//InputMethodManager.SHOW_IMPLICIT ); [javac] ^ [javac] symbol: variable view [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2888: error: cannot find symbol [javac] InputMethodManager mgr=(InputMethodManager)MonkeyGame.activity.getSystemService( Context.INPUT_METHOD_SERVICE ); [javac] ^ [javac] symbol: variable activity [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2893: error: cannot find symbol [javac] mgr.hideSoftInputFromWindow( MonkeyGame.view.getWindowToken(),0 ); [javac] ^ [javac] symbol: variable view [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2896: error: cannot find symbol [javac] mgr.showSoftInput( MonkeyGame.view,0 );//InputMethodManager.SHOW_IMPLICIT ); [javac] ^ [javac] symbol: variable view [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2899: error: cannot find symbol [javac] mgr.hideSoftInputFromWindow( MonkeyGame.view.getWindowToken(),0 ); [javac] ^ [javac] symbol: variable view [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:3025: error: cannot find symbol [javac] int sound=MonkeyData.loadSound( path,pool ); [javac] ^ [javac] symbol: variable MonkeyData [javac] location: class gxtkAudio [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:3126: error: cannot find symbol [javac] music=MonkeyData.openMedia( path ); [javac] ^ [javac] symbol: variable MonkeyData [javac] location: class gxtkAudio [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2622: error: cannot find symbol [javac] if( seq==MonkeyGame.app.seq ) discarded.add( Integer.valueOf( texId ) ); [javac] ^ [javac] symbol: variable app [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2629: error: cannot find symbol [javac] if( texId!=0 && seq==MonkeyGame.app.seq ){ [javac] ^ [javac] symbol: variable app [javac] location: class MonkeyGame [javac] C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java:2642: error: cannot find symbol [javac] seq=MonkeyGame.app.seq; [javac] ^ [javac] symbol: variable app [javac] location: class MonkeyGame [javac] Note: C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\TinyTails.build\android\src\com\monkey\MonkeyGame.java uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 26 errors BUILD FAILED C:\Android\tools\ant\build.xml:710: The following error occurred while executing this line: C:\Android\tools\ant\build.xml:723: Compile failed; see the compiler error output for details. Total time: 1 second Picked up _JAVA_OPTIONS: -Xmx512M TRANS FAILED: Android build failed. Done. |
| ||
Thats better ;) First thing to try is changing your folder structure, last time I looked Ant doesnt like spaces in folder names. Rename: C:\Users\Elliot\SkyDrive\Game Projects\TinyTails\ To: C:\Users\Elliot\SkyDrive\Game_Projects\TinyTails\ |
| ||
Nope its worked fine with them before but ive changed and still same problem. |
| ||
Have you deleted your .build folder? |
| ||
Nope. |
| ||
No wait checking logs and at some point i did delete the build folder. |
| ||
So does it now work after you deleted the build folder? |
| ||
Yes cheers thank you |
| ||
Hey Mark, maybe add a version number in the generated code or a small file so you could scan the file for it and if it less than the current version pop up a dialog informing the user to delete the build folder (not auto delete as the user might have custom files in there). |
| ||
> Hey Mark, maybe add a version number in the generated code Actually, was thinking about this the other day (again) - how about: * Add a TARGET_VERSION var to TARGET.MONKEY files in targets/target dirs. * Append that to .build dir names. As long as I remember to 'bump' TARGET_VERSION when there's a breaking change to the target, this should automatically create a new target build dir while preserving any old ones (in case they've got something important in there). There will hopefully be far less breaking changes to targets in future, since a lot of code that used to be in target project code has been moved to target module code. Changes to this code will not require deletion of .build dirs. |