no compile option for android

Monkey Targets Forums/Android/no compile option for android

dave.h(Posted 2011) [#1]
Ive installed the JDK, the Android SDK and the Apache Ant 1.8.2
I thinks the pathes are set correctly in the trans config but i dont even get an option to compile for android only html5 and its not the demo version.what am i doing wrong


Xaron(Posted 2011) [#2]
Could you post your config file please? If you haven't even the option to compile something must be wrong there.


dave.h(Posted 2011) [#3]
do you mean the connfig.winnt file



'--------------------
'Ant build tool path
'
'Must be set to a valid dir for ANDROID target support
'
ANT_PATH="C:\dave\Desktop\ANT_HOME"
'ANT_PATH="${SYSTEMDRIVE}\apache-ant-1.8.2"
'ANT_PATH="${SYSTEMDRIVE}\ant"


'--------------------

'--------------------
'MinGW path.
'
'Must be set to a valid dir for STDCPP target support.
'
MINGW_PATH="${SYSTEMDRIVE}\MinGW"
'--------------------

'--------------------
'Java dev kit path
'
'Must be set to a valid dir for ANDROID and FLASH target support
'
JDK_PATH="C:\Program Files\Java\jdk1.6.0_21"

'JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_24"
'JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_21"
'JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_19"
'--------------------

'--------------------
'Android SDK and tool paths.
'
'Must be set to a valid for for ANDROID target support
'

ANDROID_PATH="C:\Program Files\Android\android_sdk"
'ANDROID_PATH="${SYSTEMDRIVE}\android-sdk"
'ANDROID_PATH="${PROGRAMFILES}\Android\android-sdk"
'--------------------

'--------------------
'Flex SDK path.
'
'Must be set for FLASH target support.
'
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"
'--------------------

'--------------------
'MSBUILD path.
'
'Must be set for XNA and GLFW target support.
'
MSBUILD_PATH="${WINDIR}\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
'--------------------

'--------------------
'Tool used to 'run' .html files.
'
'This is optional, OS default tool for .html files will be used if this not set.
'
'HTML_PLAYER="${PROGRAMFILES}\Mozilla Firefox\firefox.exe"
'--------------------

'--------------------
'Tool used to 'run' flash .swf files.
'
'This is optional, OS default tool for .swf files will be used if this not set.
'
'FLASH_PLAYER="${PROGRAMFILES}\Mozilla Firefox\firefox.exe"
'--------------------



hope you meant this file ive rechecked the directories and they are right but its funny why i dont even get an option to run anything but html


Loofadawg(Posted 2011) [#4]
Just a glancing through it quickly, the problem may be the that you used "_" instead of "-"

replace this:
ANDROID_PATH="C:\Program Files\Android\android_sdk"

with this:
ANDROID_PATH="C:\Program Files\Android\android-sdk"



dave.h(Posted 2011) [#5]
no i changed that and still no option appears to compile for anything else but thanks for pointing that out.


dave.h(Posted 2011) [#6]
fixed it was a similiar mistake should have been

ANT_PATH="C:\Users\dave\Desktop\ANT_HOME"

thanks for the help it pointed me in right direction.


Loofadawg(Posted 2011) [#7]
Other things to check...

Which version number of Java did you install? Your path says

JDK_PATH="C:\Program Files\Java\jdk1.6.0_21"

If you just recently installed JAVA, it should probably be:
JDK_PATH="C:\Program Files\Java\jdk1.6.0_24"


Android will not show up as a Target unless that is set right.

Finally, On this computer, I am using Windows 7 64bit. I had a problem using the Java "Windows x64" version and so I had to go back and install "Windows" version.


Hope that helps.


Loofadawg(Posted 2011) [#8]
Oh, one last thing. Anytime you make adjustments to the "config.winnt.txt"
You will need to restart Monkey. And do make sure the file is "config.winnt.txt" and not "connfig.winnt". ;^)


dave.h(Posted 2011) [#9]
yeah typos was my error but got it all going now even got a small version of a towerdefence going on the emulator but its very slow


Xaron(Posted 2011) [#10]
Yep. I don't use the emulator at all. I develop with GLFW and just use my Android directly if I want to test something. I just put the apk file onto the SD card and install it then. :)


Loofadawg(Posted 2011) [#11]
If your phone is set to debug and is hooked up to the PC via USB, you can skip the emulator all together and have the APK pushed to the phone and installed. Very nifty.

I test stuff in HTML first though.

Some difference I noticed though between the two:

Draw a line from 0,0 to 0,480 or 0,0 to 800,0 and you will not see it on the Android device. HTML, you will.
It appears, at least on my device, that the visible viewing area for Android starts at 1,1 and ends with 800,480. Where as your PC is 0,0 to 799,479 (or whatever you have it set to).

Floating points display/act different than they do on HTML. Can't elaborate too much as I got some errands to run, but I will try to write up some code to clarify it later. It isn't a biggie, certainly not a deal breaker just something that you may need to be aware of.

@dave.h Glad you got it all worked out. Happy Monkeying !!


dave.h(Posted 2011) [#12]
thanks very usefull tips. im on errands now well im going pub anyway got the week off cheers


Acissathar(Posted 2011) [#13]
I'm having trouble with this aswell. I believe my problem is the Java download. Which is the correct download for version 25? The options I see are windowsx86, windows intel, and windows x64.


Loofadawg(Posted 2011) [#14]
On my Windows 7 64bit machine I had to use x86 version of Java. x64 did not work for me.

Just verifying everything:

http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html

The version you need is:
Windows x86 76.66 MB jdk-6u25-windows-i586.exe

** Once you installed, take special note of where it is installed **

This might be obvious but...
You will also need to make sure you use the right version number in the "config.winnt.txt" file.

example, my path is (I am behind, using version 21)
JDK_PATH="C:\Program Files (x86)\Java\jdk1.6.0_21"

where as yours may be:
JDK_PATH="C:\Program Files (x86)\Java\jdk1.6.0_25"

Final step, if Monkey is currently running, EXIT it. Then restart Monkey.

If you are still having problems, then post your config file and we can take a look at it.


dave.h(Posted 2011) [#15]
it was the path i put

ANT_PATH="C:\dave\Desktop\ANT_HOME"

and it should have been

ANT_PATH="C:\users\dave\Desktop\ANT_HOME"

sorted now thanks


Acissathar(Posted 2011) [#16]
Alright, I tried downloading the other java version and I'm still having issues. Here is my config file:


'--------------------
'Ant build tool path
'
'Must be set to a valid dir for ANDROID target support
'
'ANT_PATH="${SYSTEMDRIVE}\apache-ant-1.8.2"
ANT_PATH="C:\ant"
'--------------------

'--------------------
'MinGW path.
'
'Must be set to a valid dir for STDCPP target support.
'
MINGW_PATH="${SYSTEMDRIVE}\MinGW"
'--------------------

'--------------------
'Java dev kit path
'
'Must be set to a valid dir for ANDROID and FLASH target support
'
JDK_PATH="C:\Program Files (x86)\Java\jdk1.6.0_25"
'JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_21"
'JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_19"
'--------------------

'--------------------
'Android SDK and tool paths.
'
'Must be set to a valid for for ANDROID target support
'
ANDROID_PATH="C:\Program Files (x86)\Android\android-sdk"
'--------------------

'--------------------
'Flex SDK path.
'
'Must be set for FLASH target support.
'
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"
'--------------------

'--------------------
'MSBUILD path.
'
'Must be set for XNA and GLFW target support.
'
MSBUILD_PATH="${WINDIR}\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
'--------------------

'--------------------
'Tool used to 'run' .html files.
'
'This is optional, OS default tool for .html files will be used if this not set.
'
'HTML_PLAYER="${PROGRAMFILES}\Mozilla Firefox\firefox.exe"
'--------------------

'--------------------
'Tool used to 'run' flash .swf files.
'
'This is optional, OS default tool for .swf files will be used if this not set.
'
'FLASH_PLAYER="${PROGRAMFILES}\Mozilla Firefox\firefox.exe"
'--------------------



Thanks for all the help :)


Acissathar(Posted 2011) [#17]
I found my error. I accidentally commented out the wrong Ant line >.<

Thank you though Loofadawg for showing me which java download I needed!