Page 1 of 6

ZGameEditor & Android Setting

Posted: Fri Jan 04, 2013 5:45 am
by prinsukun
First of all, congrats for the zgameeditor ^___^, it's one of the best 3d game edtior i have ever seen, sense 3Drad in term of ease, i hope the dev continue to support this awesome game tools.

i'm here to get some insight how i set android setting, especially the Apache Ant Path

Image

sorry if this already mentioned somewhere in the website/forum, i just didn't found it out, also i'm completely new to zgameeditor with android, i'm just coming from yoyogames gamemaker background, and didn't know what apache path referred too yet, sense most 2d game tools don't have have this setting.

thanks an advance. [/b]

Posted: Fri Jan 04, 2013 8:29 am
by Rado1
Hi prinsukun,

to build an Android application in ZGE, you must have Ant installed on your machine. Just download it from here, unpack somewhere on disc, eg., C:\Program Files\apache-ant-1.8.4, and type this path (C:\Program Files\apache-ant-1.8.4) to the Settings/Android/Apache Ant Path field. That's it.

Posted: Fri Jan 04, 2013 1:46 pm
by prinsukun
@Rado1

You just made my day, thank you so much :D

Posted: Fri Jan 04, 2013 4:41 pm
by prinsukun
Another problem i'm facing with exporting the apk, here it's:

Image

I tried reinstall the jdk, set jdk to c/:, restarted my laptop but still no luck..
i wish their a way for ZGameEditor to check if all path and stuff for android are installed in the user hard disk. :cry:

Posted: Fri Jan 04, 2013 5:05 pm
by Kjell
Hi prinsukun,

Just as a sidenote. In order to test your ZGameEditor project on a Android device you can / should use the ZGE Android debugger ( which doesn't require the Android SDK nor Java ). Make sure to check out this video tutorial.

Obviously, when you're done with a project and want to submit it to the Google Play store, you do want / need to build a signed standalone .apk

K

Posted: Fri Jan 04, 2013 6:33 pm
by Rado1
Hi prinsukun,

your java cannot be found by ANT. Just make sure that the environment variable JAVA_HOME points to the correct path. Just to be sure even more, you can also define additional environment variables pointing to the corresponding paths: ANDROID_SDK_HOME, ANDROID_HOME (the same path as ANDROID_SDK_HOME), ANDROID_NDK_ROOT, and ANT_HOME. %JAVA_HOME%/bin and %ANT_HOME%/bin can be added to the PATH variable.

As Kjell pointed out, this is really necessary only if you want to create own apk files, for zzdc.dat used for debugging/testing Java, ANT, SDK are not required.

Posted: Sat Jan 05, 2013 12:05 pm
by prinsukun
@Kjell thank you so much, this method will save me a lot of time for each time i want test my apps ;D, thanks for the link too as well.

@Rado1

I already believed i installed JDK, and not have deep knowledge how i set the path or where i should refered that ?

but for the odd reason my system won't recognized when i type javac despite it's already installed.. at cmd, my os is windows7 64-bit, i just goggled and it's seem many folks having a similar problem, i tried set path manually at advanced properties, reinstalling, restart my system but no luck, but i guess i will try to follow this article, might help, i do i still need to publish an apk:
http://www.coderanch.com/t/531940/java/ ... gram-batch

I appreciated your help guys, thanks :)

Posted: Fri Apr 25, 2014 11:28 am
by Ats
Hi guys,
From time to time, I'm still trying to build an apk... I have the lastest adt-bundle-windows-x86 and apache-ant-1.9.3 installed, with their paths correctly set in the settings, and I've also installed JDK1.7.0_55

But it says:
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar

Why does it search for tools.jar in JRE instead of JDK? Where can I set that?
Is there any clear tutorial about how to compile an apk with ZGE? I mean, step by step :)

Thanks a lot!

Posted: Fri Apr 25, 2014 11:47 am
by Rado1
Hi Ats, try to set the JAVA_HOME environment variable to JDK path (C:\Program Files\Java\jdk1.7.0_55).

Posted: Fri Apr 25, 2014 11:55 am
by Ats
Hi Rado1, I've read your last post telling that I we have to set paths, but like prinsukun, I don't know where to do that. Is that in a file of the ANT folder?

Posted: Fri Apr 25, 2014 12:06 pm
by Rado1
Ats wrote:Hi Rado1, I've read your last post telling that I we have to set paths, but like prinsukun, I don't know where to do that. Is that in a file of the ANT folder?
Go to Control Panel, search for View advanced system settings, open the dialog, select Advanced tab, press the Environment Variables... button, and add there a new system variable JAVA_HOME or modify existing one, if it already exists.

Posted: Fri Apr 25, 2014 1:02 pm
by Kjell
Hi guys,

Basically what Rado said .. in images ( using Windows 7 ) :wink:

1 - Right-click on Computer and select Properties.

Image

2 - Click on "Advanced system settings".

Image

3 - Click the "Environment Variables" button.

Image

4 - Click the New button in the System variables group.

Image

5 - Fill in the variable fields and click OK.

Image

K

Posted: Fri Apr 25, 2014 1:12 pm
by Ats
Thanks Rado1 and Kjell :)
I wasn't thinking of Windows environment variables because I've been using linux for years now, and switch to Windows only for that kind of silly things...

So it's almost working, I have one last error, but I think I've read something about that somewhere on the forum. I'm browsing it right now.

BUILD FAILED
C:\Program Files\adt-bundle-windows-x86\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-8'

Posted: Fri Apr 25, 2014 1:22 pm
by Rado1
Ats wrote:BUILD FAILED
C:\Program Files\adt-bundle-windows-x86\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-8'
You need to install Android SDK for Android 2.2. Go to the Android SDK Manager (located e.g. in "C:\Program Files\ADT\sdk\SDK Manager.exe"), and install the related SDK Platform. But if you are compiling for OUYA, install Android 4.1.2 (API 16) SDK Platform and change ZApplication.AndroidSdk property in your ZGE project to 4.1.

Posted: Fri Apr 25, 2014 3:22 pm
by Ats
Thanks, now it's working great.
I have one last question: how do you compile the exported folder into an APK? Is that only some kind of zip file?
I've tried with aapt.exe but didn't get anything.