Help with Android build target

Monkey Forums/Monkey Beginners/Help with Android build target

Chugs(Posted 2014) [#1]
Hi,

Kinda new to this monkey x thing - just bought it.

So, I'm trying to setup for compiling to the Android target. HTML5 no probs.

I downloaded and installed ANT, the Android SDK and the Java JDK and changed the paths in the config.winnt.txt file should I have a new target available at the top of the IDE?

Or am I missing something or do I need to do something else?


dawlane(Posted 2014) [#2]
Have you download the Monkey X Pro zip file? This is almost the same as the Free edition, but it doesn't come with the MinGW compiler and of course has the files for the other targets. Once you have every thing set up correctly within the Monkey Pro confit file, you use the monkey executables in the pro edition. You should have Android and the Ouya targets. Note: make sure that you run the Android tool first and install the correct API. The last time I used Android you need API 3.2, but I heard that there is support the latest API.


Why0Why(Posted 2014) [#3]
You can also download the demo of Jungle IDE and it will install the targets for you.


Chugs(Posted 2014) [#4]
Thanks for the info and replies guys. :-)

@ dawlane yeah I have the pro version (zip). You mentioned the 'Monkey Pro Config' file is that same one I was talking about?

@ why0why I thought about trying that IDE maybe I'll give it a try if I can't get my other targets to show up. It will install the targets to Monkey X?


Why0Why(Posted 2014) [#5]
Yes it will.


Chugs(Posted 2014) [#6]
Thanks for taking time to help guys. :-)

Actually I'm a dufus... I figured out my mistake.
I didn't realize I had typed the Android SDK file path wrong in the config file.

Once I did that, I restarted and my targets showed up. :D


Chugs(Posted 2014) [#7]
Ok, now I get this compile error:

BUILD FAILED
C:\Program Files\android\android-sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-13'

Do I need to install an older SDK? Or am I forgetting code somewhere ... Not sure.


Amon(Posted 2014) [#8]
In the android sdk folder click the "sdk manager.exe" and install at minimum sdk 13. Warning for you if you have a slow net connection is that it may take a while to download all the sdk that are relevent.


Chugs(Posted 2014) [#9]
Ok Thanks. I'll check it out.

One more question, There's that monkey.config file in the Android target folder with all the Android command lines. Does that compile in automatically, or do I need to use that code in my source?


Chugs(Posted 2014) [#10]
Installed the API 13 my build worked! Ran the debug on my device. I find a couple things strange though. I had installed the most recent build tools (API 21) why didn't they work?

Maybe there's something in there I'm not catching.

That tool set was older. My program also became unresponsive, guess more work is needed.


Amon(Posted 2014) [#11]
You basically set which version is the minimum and maximum within the manifest file. I believe it's called 'AndroidManifest.xml'. I think there is another file where you need to set the minimum version also.

Best to have a look here as I may not be entirely correct. http://stackoverflow.com/questions/5427195/how-to-change-a-projects-min-sdk-version


Chugs(Posted 2014) [#12]
I clicked the link - definitely some useful info there - Thanks!

After testing my app a couple times, I think I know why it's crashing too :)


Chugs(Posted 2014) [#13]
Is there a way to plug and play running a build of your app on Android? It gets old copying the .APK file over and over again.
I installed what I believe is the USB driver I need. You have to enable developer tools on your device right?
I'm using a Samsung Galaxy S4, but don't see a developer setting anywhere in my settings.


Arabia(Posted 2014) [#14]
I think the USB driver is a bit hit & miss. I compile to a Galaxy Tab, won't work on my desktop even though I can see the device and copy files to it, but on my laptop, it's plug & play - compile and it launches on the device straight away - a lot easier as you would know.

I noticed someone mentioned JungleIDE, check out the free version first, it's worth every cent in my opinion. Fantastic piece of gear.


Steve Ancell(Posted 2014) [#15]
I found that changing the install paths to "C:\Android" and "C:\apache-ant-1.9.4" worked a treat. It doesn't seem to like paths with spaces such as "C:\Program Files (x86)\Android" etc...


Chugs(Posted 2014) [#16]
Thanks for the help guys. I did figure it out, I had to unlock the developer options on my phone and it worked. Kinda strange how I had to do it tho.
For those of you using a galaxy s4 or later (maybe) go to your settings, about phone and tap the build version 7 times and it will unlock developer options. :)

Another question I have is there code for Facebook sharing for your app somewhere?


Steve Ancell(Posted 2014) [#17]
Had to do the same for my Galaxy Ace by enabling unknown sources and USB debugging.


Volker(Posted 2014) [#18]
Another question I have is there code for Facebook sharing for your app somewhere?

Look here:
http://www.monkey-x.com/Community/posts.php?topic=7892


Chugs(Posted 2014) [#19]
Thanks for the link Volker, I'll check it out :)


Chugs(Posted 2014) [#20]
Ok, does anyone have simple code examples for facebook plug-ins? Don't really want to install or compile in an entire frame work to use a couple of functions.

Also, do I have to have a page for my game on FB? I created one, but is it absolutely necessary for plug-ins?


Chugs(Posted 2014) [#21]
Is it a good idea to have the app on a portal, app store or Google Play before doing FB plug-ins? Just wondering because of ID's mentioned in Diddy framework for FB.

Created my release-key.keystore file to sign my app. Do I have to create a new one for every app I make? Or can I use the same one over and over again?

I also built my release version and included the release-key.keystore file. It shows these files (among others): MonkeyGame-release-unsigned.apk and MonkeyGame-release.apk <- is this one the signed one? or will it contain -signed in the filename?

I know it's a bunch of questions, but I'm just not sure. :)