Android target compile error
Monkey Targets Forums/Android/Android target compile error
| ||
Hi there, I was wondering if someone could possibly help me out here please. I'm trying to compile to the Android target but keep getting the following error in the compile window: BUILD FAILED Cannot find C:\android\sdk\tools\tools\ant\build.xml imported from C:\Users\Ash\Desktop\crime game\game.build\android\build.xml Any help would be greatly appreciated. Many thanks! |
| ||
Maybe the same issue as this: http://www.monkeycoder.co.nz/Community/posts.php?topic=1962 |
| ||
Ah I remember this post, I've already upgraded the SDK to V15 as well as later versions but nothing seemed to change, even after deleting the build folder too. I'm thinking it's something to do with the path: C:\android\sdk\tools\tools\ant\build.xml I can see that there is a build.xml file in c:\android\sdk\tools\ant but there is no directory called c:\android\sdk\tools\tools\ant so I'm not sure where it's getting that from? :/ |
| ||
LOL! I thought that was a typo! What in your monkey config file? |
| ||
Haha ;o) I does look like it at first glance actually, lol. Here is my config settings file: '-------------------- 'HTML player path. ' 'Must be set for HTML5 target support. ' 'for opening .html files... ' HTML_PLAYER="${TRANSDIR}\mserver_winnt.exe" '-------------------- '-------------------- 'Ant build tool path ' 'Must be set to a valid dir for ANDROID target support ' 'Ant is currently available here: ' http://ant.apache.org/bindownload.cgi ' ANT_PATH="${SYSTEMDRIVE}\apache-ant-1.8.0" ANT_PATH="${SYSTEMDRIVE}\apache-ant-1.8.0\bin" '-------------------- '-------------------- 'MinGW path. ' 'Must be set to a valid dir for STDCPP target support. ' 'MinGW is currently available here: ' http://tdm-gcc.tdragon.net/download ' MINGW_PATH="${SYSTEMDRIVE}\MinGW32" MINGW_PATH="${SYSTEMDRIVE}\MinGW" '-------------------- '-------------------- 'Java dev kit path ' 'Must be set to a valid dir for ANDROID and FLASH target support ' 'Make sure to install the 32 bit JDK, even on 64 bit Windows! ' 'The Java JDK is currently available here: ' http://www.oracle.com/technetwork/java/javase/downloads/index.html ' JDK_PATH="${PROGRAMFILES}\Java\jdk1.7.0_02" JDK_PATH="${PROGRAMFILES}\Java\jdk1.7.0_13" JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_23" JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_21" JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_19" JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_41" '-------------------- '-------------------- 'Android SDK and tool paths. ' 'Must be set to a valid for for ANDROID target support ' 'The Android SDK is currently available here: ' http://developer.android.com/sdk/index.html ' ANDROID_PATH="${SYSTEMDRIVE}\android\sdk\tools" '-------------------- '-------------------- 'Flex SDK and flash player path. ' 'FLEX_PATH Must be set for FLASH target support. ' 'Either HTML_PLAYER or FLASH_PLAYER must be set for FLASH target support. ' 'The Flex SDK is currently available here: ' http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK ' FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.6" FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.5" FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.1.0.16076" FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.1" FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.0.0.14159" FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.0" FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4" FLEX_PATH="${SYSTEMDRIVE}\flex_sdk" ' 'for opening .swf files...monkey will use HTML_PLAYER if this is not set. 'FLASH_PLAYER="${SYSTEMDRIVE}\flex_sdk_4.0\flashplayer_10_sa_debug.exe" ' '-------------------- '-------------------- 'Play Station Mobile SDK path. ' 'PSM_PATH must be set for PSM target support. ' 'Note: This will soon replace the Play Station Suite target - use this instead!!!!! ' PSM_PATH="${PROGRAMFILES}\SCE\PSM" '-------------------- '-------------------- 'MSBUILD path. ' 'Must be set for XNA and GLFW target support. ' 'Visual C++ 2010 Express is required for GLFW target support and is currently available here: ' http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express ' 'Visual C# 2010 Express and XNA 4.0 are requred for XNA target support and are currently available here: ' http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express ' http://www.microsoft.com/download/en/details.aspx?id=23714 ' MSBUILD_PATH="${WINDIR}\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" '-------------------- |
| ||
Try setting the ANT_PATH and ANDROID_PATH manually eg: ANDROID_PATH="c:\android\sdk\tools" Don't rely on SYSTEMDRIVE. |
| ||
Hm, it still seems be trying to access the c:\android\sdk\tools\tools\ant folder. The compiler output looks a little different now though after making those changes to the config file :) TRANS monkey compiler V1.42 Parsing... Semanting... Translating... Building... * daemon not running. starting it now on port 5037 * * daemon started successfully * Buildfile: C:\Users\Ash\Desktop\crime game\game.build\android\build.xml BUILD FAILED C:\Users\Ash\Desktop\crime game\game.build\android\build.xml:83: Cannot find c:\android\sdk\tools\tools\ant\build.xml imported from C:\Users\Ash\Desktop\crime game\game.build\android\build.xml Total time: 0 seconds Buildfile: C:\Users\Ash\Desktop\crime game\game.build\android\build.xml BUILD FAILED C:\Users\Ash\Desktop\crime game\game.build\android\build.xml:83: Cannot find c:\android\sdk\tools\tools\ant\build.xml imported from C:\Users\Ash\Desktop\crime game\game.build\android\build.xml Total time: 0 seconds * daemon not running. starting it now on port 5037 * * daemon started successfully * Starting: Intent { cmp=com.monkey/.MonkeyGame } Error type 3 Error: Activity class {com.monkey/com.monkey.MonkeyGame} does not exist. Done. |
| ||
I thought this has been fixed, but now try removing the space from your project path... Crime game. |
| ||
Ah, i really thought that was going to work then :p No joy thoughParsing... Semanting... Translating... Building... * daemon not running. starting it now on port 5037 * * daemon started successfully * Buildfile: C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml BUILD FAILED C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml:83: Cannot find c:\android\sdk\tools\tools\ant\build.xml imported from C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml Total time: 0 seconds Buildfile: C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml BUILD FAILED C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml:83: Cannot find c:\android\sdk\tools\tools\ant\build.xml imported from C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml Total time: 0 seconds * daemon not running. starting it now on port 5037 * * daemon started successfully * Starting: Intent { cmp=com.monkey/.MonkeyGame } Error type 3 Error: Activity class {com.monkey/com.monkey.MonkeyGame} does not exist. Done. |
| ||
It's a mystery to me where it's getting the c:\android\sdk\tools\tools\ant path folder from :/ |
| ||
I went into the build.xml file in the crimegame folder and changed the following line: <import file="${sdk.dir}/tools/ant/build.xml" /> to <import file="${sdk.dir}/ant/build.xml" /> since I assume that's where the problem was with the path on the xml file :) It's got past that stage now on the compiler but now I get this: TRANS monkey compiler V1.42 Parsing... Semanting... Translating... Building... * daemon not running. starting it now on port 5037 * * daemon started successfully * Buildfile: C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml [taskdef] Could not load definitions from resource anttasks.properties. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. -check-env: BUILD FAILED c:\android\sdk\tools\ant\build.xml:401: Problem: failed to create task or type checkenv Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. Total time: 0 seconds Buildfile: C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml [taskdef] Could not load definitions from resource anttasks.properties. It could not be found. [taskdef] Could not load definitions from resource emma_ant.properties. It could not be found. -set-mode-check: -set-debug-files: BUILD FAILED c:\android\sdk\tools\ant\build.xml:401: Problem: failed to create task or type checkenv -check-env: Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any <presetdef>/<macrodef> declarations have taken place. Total time: 0 seconds * daemon not running. starting it now on port 5037 * * daemon started successfully * Starting: Intent { cmp=com.monkey/.MonkeyGame } Error type 3 Error: Activity class {com.monkey/com.monkey.MonkeyGame} does not exist. Done. Any ideas what this problem could be? |
| ||
getting even closer now I feel :) I have just changed the following line in the config.winnt file: ANDROID_PATH="c:\android\sdk\tools\" to ANDROID_PATH="c:\android\sdk\" and now I get this on the compiler: TRANS monkey compiler V1.42 Parsing... Semanting... Translating... Building... * daemon not running. starting it now on port 5037 * * daemon started successfully * Buildfile: C:\Users\Ash\Desktop\crimegame\game.build\android\build.xml -check-env: [checkenv] Android SDK Tools Revision 21.1.0 [checkenv] Installed at c:\android\sdk -setup: [echo] Project Name: MonkeyGame [gettype] Project Type: Application -pre-clean: clean: [getlibpath] Library dependencies: [getlibpath] No Libraries [subant] No sub-builds to iterate on BUILD SUCCESSFUL Total time: 1 second Buildfile: C:\Users\Ash\Desktop\crimegame\game.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\sdk -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... BUILD FAILED c:\android\sdk\tools\ant\build.xml:541: Unable to resolve project target 'android-13' Total time: 1 second * daemon not running. starting it now on port 5037 * * daemon started successfully * Starting: Intent { cmp=com.monkey/.MonkeyGame } Error type 3 Error: Activity class {com.monkey/com.monkey.MonkeyGame} does not exist. Done. |
| ||
I've read that the:BUILD FAILED c:\android\sdk\tools\ant\build.xml:541: Unable to resolve project target 'android-13' message refers to not having the Android 13 SDK installed but I've just double checked on the SDK manager and it shows: Android 3.2(AP13) - SDK Platform -> installed so this error message isn't making much sense at the moment :/ |
| ||
Aha, I DID have version 13 installed, however it was installed in a separate android folder on the desktop :o DOH! It was only when I went into the Android folder in the C drive and noticed only version 17 there (i thought that was odd, lol) so I copied the version 13 folder from the other Android folder on the desktop, pasted it into the correct folder and it works now!! Many thanks for your assistance though, it's much appreciated :) |
| ||
Excellent, glad you got it to work :) |