Page 4 of 7

Re: Building an Android .apk -file

PostPosted: Wed Jun 05, 2013 3:57 pm
by lcl
I added a new section telling about how to customize the app. (Changing the application's name, icon and orientation!)

Re: Building an Android .apk -file

PostPosted: Wed Jun 05, 2013 11:22 pm
by Jagmaster
I was wondering how to change the orientation just yesterday!
Pretty good timing I'd say. :)

Re: Building an Android .apk -file

PostPosted: Thu Jun 06, 2013 10:43 am
by lcl
Jagmaster wrote:I was wondering how to change the orientation just yesterday!
Pretty good timing I'd say. :)

Haha :D Glad you found it useful.

Re: Building an Android .apk -file

PostPosted: Wed Jul 03, 2013 8:34 pm
by Lacotemale
That's interesting.. It hasn't done that to me, are you sure your setup.bat is ok?


Probably not, here it is:

Code: Select all
set ANT_HOME=C:\Program Files\apache-ant-1.9.0
set CLASSPATH=C:\Program Files\Java\jdk1.7.0_21\lib
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21
set PATH=%path%;%ANT_HOME%\bin
set PATH=%path%;C:\Users\Dylan\Downloads\android-sdk\sdk\tools


Does it look okay? :?

Re: Building an Android .apk -file

PostPosted: Sun Nov 17, 2013 11:16 am
by harpree3
In mine , its not say that BUILD SUCCESSFUL
it says that build failed
c:\android-sdk\tools\ant\build.xml:720: The following error occurred while executing this line:
c:\android-sdk\tools\build.xml:734: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\java\jre7"
total time: 3 seconds

C:\Downloads\geandroid>

now plz tell me what to do, what wrong in this , plz tell me

Re: Building an Android .apk -file

PostPosted: Fri Dec 06, 2013 11:48 am
by Behdadsoft
Hi lcl :D

thanks for good tutorial. but my apk don't build and it says that build failed. I export my dat file with geplayer.dat name and put it in geandroid\assets folder.
this is my setup.bat file:

Code: Select all
set ANT_HOME=c:\apache-ant-1.8.2
set CLASSPATH=C:\Program Files\Java\jdk1.7.0_21\lib
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21
set PATH=%path%;%ANT_HOME%\bin
set PATH=%path%;c:\android-sdk\tools


and this is my command prompt log file.
where is the Problem?

Thanks

Re: Building an Android .apk -file

PostPosted: Thu Dec 12, 2013 9:51 pm
by barney12345
Hello, I see it was a long time before the last message, so when I went to try the process, everything had been updated a lot, eg its apache ant 1.9.2 now. Do you think you could update the tutorial so it works now

Works now meaning I get an error message saying
Code: Select all
'ant' is not recognised as an internal or external command, operable program or batch file
I have everything fixed for the setup.bat so it fits the programs

Code: Select all
set ANT_HOME=C:\Users\(my name)\Downloads\apache-ant-1.9.2-bin
set CLASSPATH=C:\Program Files\Java\jre7\lib
set JAVA_HOME=C:\Program Files\Java\jre7
set PATH=%path%;%ANT_HOME%\bin
set PATH=%path%;C:\Users\(my name)\Downloads\adt-bundle-windows-x86-20131030\adt-bundle-windows-x86-20131030\sdk\tools

Plz help

Re: Building an Android .apk -file (Tutorial is outdated!)

PostPosted: Wed Dec 18, 2013 5:08 pm
by lcl
Attention!

The tutorial has become outdated, and thus is useless by now.
I will do my best to try to fix it when I have some time, but that might not be all to soon.

For now, you can always send me your games exported as .dat -files, and I can build them to .apk's for
you, since I still have the old versions of software needed for this tutorial to work.

Re: Building an Android .apk -file (Tutorial is outdated!)

PostPosted: Thu Dec 19, 2013 4:18 pm
by Behdadsoft
can you upload old version of softwares?

Re: Building an Android .apk -file (Tutorial is outdated!)

PostPosted: Thu Dec 19, 2013 5:27 pm
by lcl
Behdadsoft wrote:can you upload old version of softwares?

Maybe. I will have to try it when I get some time, and an access to some other computer that doesn't have the stuff installed already.

Re: Building an Android .apk -file (Tutorial is outdated!)

PostPosted: Thu Dec 19, 2013 10:04 pm
by Behdadsoft
Hi guys. :D
Finally I find the Problem for build android .app file.

I update lcl Tutorial in this Post. :wink:
First of Everything, It does not matter what version of software you are using. you can build your .apk file with any version of (apache-ant and java sdk).

lets begin:
1) Download and extract GE Android, which you'll find here:
Code: Select all
http://game-editor.net/index.php/downloads/category/6-engine-beta


(Note that you have to be signed in to the game-editor.net for having the access to the file!)

2) Download and install Android SD, you'll find it here:
Code: Select all
http://developer.android.com/sdk/index.html


Choose the one that's recommended. If it tells you to get Java SE Development Kit (JDK), get it.
Don't install it to Program Files (x86), because windows will not let it download what it has to download.

3) Download Apache Ant from here:
Code: Select all
http://www.softpedia.com/get/Programming/Other-Programming-Files/Apache-Ant.shtml


Now Extract or Install All files to Drive C and no Program Files.See below
for example:
c:\apache-ant-1.9.2
C:\jdk1.7.0_21
c:\android-sdk
C:\geandroid

4). Write a similar bat -file in Notepad or some other program:
Code: Select all
set ANT_HOME=c:\apache-ant-1.9.2
set CLASSPATH=C:\jdk1.7.0_21\lib
set JAVA_HOME=c:\jdk1.7.0_21
set PATH=%path%;%ANT_HOME%\bin
set PATH=%path%;c:\android-sdk\tools


ATTENTION!
1.don't Install java SDK or (apache-ant, andriod-sdk) in Program Files Folder.
2.try use lowercase for your folder name.(eg: use android instead of Android, and so on.)
3.don't use space or any sing (eg: ., *, %, @, ...) for folder name.


So, set ANT_HOME to be the path to the folder named exactly apache-ant-1.9.2. So, if you got a folder named apache-ant-1.9.2-bin, that's not the right one, in that folder there is a subfolder, which has the right name, be careful!
And for the CLASSPATH, you'll have to search where it has installed your JDK, and the lib-folder. It's most likely in C:\Java\jdk1.7.0_02\lib
JAVA_HOME is the folder where you can find the lib-folder, so most likely: C:\Java\jdk1.7.0_021
The next line you can leave as it is.
And the last line, replace the c:\android-sdk\tools with your android-sdk tools folders location.

Save the file with the name setup.bat and in your geandroid -folder.

5) Open SDK manager.exe. (You can find it from the folder where you have installed the Android SD.)
Select and Install Package similar pictures(if you Install Android SDK like pictures I Promise 90% will solve the problem ):
Image
Image

6) Now copy your GE file (exported as .dat) and place it to geandroid\assets
Your file has to be named as geplayer.dat! (This may change to game-editor.dat!)

7) Search Command Prompt from your computer, it can be in: Start menu -> All Programs -> Accessories -> Comman Prompt
Open it and type:

Code: Select all
cd C:\geandroid


Replace the location with the location of your geandroid folder!
And press enter.

8.) Now type:
Code: Select all
setup.bat


And press enter.

9) Now type this command for update folder and sub folders:
Code: Select all
android update project -s -t 1 -p .


And press enter.
Write exactly as above, even a little mistake, and it gives you an error!

10) Now type:
Code: Select all
ant debug


And press enter.
It takes few seconds and then it should show the following text:
BUILD SUCCESSFUL

11) Now go to your geandroid -folder -> bin and there you should see a list of files named as: GEActivity... Search the one named as GEActivity-debug.apk and copy that to your phone.

12) Search the file from your phone (for that I suggest Astro File Manager. Just search Astro from the Android market), install it and...
ENJOY! :D

if You have any Question just ask. :D

Re: Building an Android .apk -file (Tutorial is outdated!)

PostPosted: Thu Jan 02, 2014 2:22 am
by zanza
Behdadsoft Hello, I tried your method and it works perfectly.
but I have a question, how can i install more than one apk created by me on my smartphone?
I've created several different games on a trial, install one and all is well, but when trying to install another of a different GED says "the application you want to install will replace another application. they keep all data from previous users "
How I can then install two different applications?

Re: Building an Android .apk -file (Tutorial is outdated!)

PostPosted: Thu Jan 02, 2014 11:57 am
by Goettsch
zanza wrote:Behdadsoft Hello, I tried your method and it works perfectly.
but I have a question, how can i install more than one apk created by me on my smartphone?
I've created several different games on a trial, install one and all is well, but when trying to install another of a different GED says "the application you want to install will replace another application. they keep all data from previous users "
How I can then install two different applications?


this is because the apps have the same name,to change this go to geandroid and in a XML file called Android Manifest there should be something like application name, change it how you want

Re: Building an Android .apk -file (Tutorial is outdated!)

PostPosted: Thu Jan 02, 2014 1:24 pm
by lcl
Behdadsoft wrote:Hi guys. :D
Finally I find the Problem for build android .app file.

I update lcl Tutorial in this Post. :wink:
First of Everything, It does not matter what version of software you are using. you can build your .apk file with any version of (apache-ant and java sdk).

...


Umm.. I checked your 'fixed' version of my tutorial, but basically you have done nothing differently than I did.
Every step is just the same as in my tutorial, you just explained some of them in a different way.
You don't have to install all the files straight to c:, they can be where ever one wants them to be, it's just a matter of how you configure your
setup.bat -file.

It seems that nothing was wrong with my tutorial, some people just didn't understand it completely or didn't read all the instructions.
I'm going to put my tutorial back up, and edit some of the instructions to be clearer. :)

I appreciate your helpfulness. :)

Re: Building an Android .apk -file (Tutorial is outdated!)

PostPosted: Thu Jan 02, 2014 2:24 pm
by zanza
this is because the apps have the same name,to change this go to geandroid and in a XML file called Android Manifest there should be something like application name, change it how you want


in fact it is exactly what I've done. and the same message keeps coming. if you install the previous program remains with the same name but lost the icon, also seems not to work.

for you to change the name of the application you will not "Android Manifest.xml". if you edit "C: \ geandroid \ res \ values ​​\ strings.xml", at least it's the only way it works for me and as explained in his first post lcl.
Changing the application's name:
Go to geandroid -> res -> values and open the strings.xml with Notepad. You'll see this:
CODE: SELECT ALL
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ge</string>
</resources>

Replace 'ge' with the name of your app.


I apologize for my English, blame it on google translate :?