How to build Android application package (.apk)?

Previous topic - Next topic

tagoror

Hello,

Today i started to play with a Android devide, i installed the SDK and i build a test with GLBasic for Android, but still i don't know how build an application package (.apk file) to can install the application on the device.

Can GLBasic create the .apk file? or how i can build it?

Regards,

Javier

Minion

If you have your Android phone plugged in, when you compile you application GLBasic will transfer it over to the device automagically.

Slydog

Also I assume you must use the 'Compiler' -> 'Build Multiplatform' menu item.  Then choose 'Android'.
(I don't have an Android so I've never really done this yet)
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

msx

Every time I try to build for android, get the following errors:

Quote_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.074 SN:eb639bf3 - 3D, NET
Wordcount:814 commands
compile+link:
BUILDSRIPT

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:472: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:203: apply returned: 1

Total time: 13 seconds

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:472: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:203: apply returned: 1

Total time: 8 seconds
Android=C:\Documents and Settings\Propietario\Mis documentos\GLBASIC\GLBasic\Resultados Futbol\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 52.0 sec. Time: 16:40
Build: 1 succeeded.


And I don't find the apk file. Can anyone help me?  :'(

MrTAToad

If the first stage fails, then you wont get an APK (it doesn't matter if the second stage fails).

The most common cause of failure is invalid characters in the program or company name - spaces aren't allowed and various other characters.
You also need to install the Java SDK and correctly setup all the paths.

If you can make the project available we can see if the cause is local to your system or not.

mentalthink

Are you put your android device in developer mode, for me if I not put his option verified, I don´t inject the code in my Archos.

msx

Quote from: mentalthink on 2011-Oct-01
Are you put your android device in developer mode, for me if I not put his option verified, I don´t inject the code in my Archos.

I have not a android device, I want to try it on the emulator but I need the apk file.

Quote from: MrTAToadThe most common cause of failure is invalid characters in the program or company name - spaces aren't allowed and various other characters.
You also need to install the Java SDK and correctly setup all the paths.

I Have installed the JDK and II have included the environment variable JAVA_HOME. On the other hand, I suppose you mean about name of the company is in Project-> Options, right?.


msx

Is it necessary to have an android device connected?

spicypixel

Nope you don't need an Android device connected ;)
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

mentalthink

no Msx, if you have the emulator running before you start the compiling, autmatically the application goes to the emulator, but really it´s a grear "mierda" it´s really slow, slow.

Have another manner, but I don´t know how put into the the emulator de Applications, this mode it´s using Virtual Box, and installing Android like a another S.O, it´s very easy, but I don´t succes put the info into the "virtual-Phone", in this mode seems the emulator runs very quickly.

ampos

Yo me instale el SDK y no había manera. Así que lo desinstale, y toma ya, funcionó. El GLB tiene instalao el SDK y el emulador... qué cosas.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

msx

¿El SDK de Android?, ¿no hace falta?  :blink:

ampos

Sí hace falta, pero es que el GLB ya lo trae instalao.

Yo por ejemplo, cuando lo instalé y lanzaba el emulador a mano, al dale a "run", no salía nada. Pero después de quitarlo y buscar el emulador en el GLB /compiler/.../android y lanzarlo a mano, sí que me salía un Android. Eso sí, lento como el culo.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

sf-in-sf

Quote from: mentalthink on 2011-Oct-01
......... if you have the emulator running before you start the compiling, autmatically the application goes to the emulator, but really it´s a grear "mierda" it´s really slow, slow.

I found acceptable speeds for os 2.3 and 3.0 only when you set the resolution to 320x480. In the AVD, just edit the os version before running it, and adjust the resolution. It makes a big difference.
On the day the atom is a cube I will start believing in the square pixel.