Android GLB v12

Previous topic - Next topic

MrPlow

Hi Gernot,

I am having issues getting my apk running  on my android.

I am using stretchsprite and scaling to screen size.

I noticed my debug cert is not valid but that still allows me to compiler and run my "chess clock app" fine.

The app that wont run on android is a game and gives the message "Application Failure to Load" in both my nexus 7 and bluestacks.

I don't want to publish my full source as this is a commerical program but would appreciate a few hints in the right direction...I am not using polyvector or anything too fancy...

Any ideas on what would cause an App to "Fail to load"??

Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

also noticed this not sure if relevant or not...

compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-8"
You can use "C:\Users\gary\Documents\GL_PROJECTS\GLBasic\Galaxians\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
%ANDROIDSDK% not set. Using GLBasic's default target-8, Android 2.2
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

Okay so i updated my %AndroidSDK% using the Set bat file but now...

was told to download "ant" from some webpage...so i did...

Now my error is
...



_______________________________________

compile+link:
running glb_build.bat
Specified ANDROID_TARGET="android-16". Please verify your AndroidManifext.xml, too.



BUILD STAGE 1: Compile and pack RELEASE
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Updated project.properties
Updated local.properties
Updated file C:\Users\gary\Documents\GL_PROJECTS\GLBasic\GameProj\distribute\Android\build.xml
Added file C:\Users\gary\Documents\GL_PROJECTS\GLBasic\GameProj\distribute\Android\proguard-project.txt
.
BUILD STAGE 2: Build DEBUG and install on device
ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
finished Android build-script.
Android=C:\Users\gary\Documents\GL_PROJECTS\GLBasic\GameProj\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 14.2 sec. Time: 20:15
Build: 1 succeeded.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrTAToad

Are you using the Android Extras ?

MrPlow

I downloaded them but havent a clue what to do with them, or if they are just for inapp purchases??!!

Are they required for Android compiling?

If i compile with my GLB v 10 or 11 will that work?

I need to get my Android compiling working again ....
:'(
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

spicypixel

To get your android compiling again reinstall GLB12 dude. I made the mistake of trying to tweak the batch files myself and encountered the same problems as yourself. Ian said there was a guide on the forums to change the SDK and API however this was part of the instructions for Android Extras. At the moment I'm a little apprehensive of using AE until all is finalised with GLB.

For example will the Android SDK come bundled, if not then there will likely be instructions from Gernot regarding the native integration of the SDK and API. Using AE now will likely mean there are issues when there's a new GLB12 update, and as everything is so close (guessing) to release then I'm personally gonna hold off I think for a little while.
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.

Ian Price

Quote from: MrPlow on 2013-Nov-27
I downloaded them but havent a clue what to do with them, or if they are just for inapp purchases??!!

Are they required for Android compiling?

If i compile with my GLB v 10 or 11 will that work?

I need to get my Android compiling working again ....
:'(

Android Extras definitely works with V11.XXX (I'm not using V12 at the moment.

Normal Android commands weren;t working properly on the OUYA with GLBasic's stock Android compilation (eg OUYA controllers weren't working), so Android Extras fixed that, as well as the screen orientation and sound issues and also allows InAppPayments (which I'm working on now, with a LOT of help from SpaceFractal).

AndroidExtras is working brilliantly on the OUYA (I don't have any other actual Android devices to test on, but I suspect it to be the same on those - it's certainly working with BlueStacks (until I press a cursor key then it exits)).

I'd certainly recommend getting your head around Android Extras and taking the time to get it to work. I'm a total doofus with Android and I've managed to get AquaVenture onto the OUYA without any major problems.

SpaceFractal and FiveSprites have done a lot of work on AndroidExtras and IAP for Android - I'm pretty sure they'll ensure that it works with GLB V12 (if it doesn't already).
I came. I saw. I played.

spacefractal

#7
the bluestacks issue have been fixed. im have forget to update the gamecontroller java, which im does that very soon. im thinks im fixed that for a week ago. The isssue was a array out of bounce issue (playerid was -1 and tried to uses that on a array). its due some ouya code wich wont implement playerid for other systems.

GL12 Works nice with androidextras and the latest one was with tested v12 in mind.

Today im only uses v12 for both Ios and Android. All major issues with both systems is fixed.

EDIT:
Updated SDLActivity.java (dated 27-11-2013) and GameControllers.java (dated 13-11-2013) to both the sdk upgrade files as well androidextras alone. Those should fixes it.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spicypixel

Quote from: spacefractal on 2013-Nov-27
GL12 Works nice with androidextras and the latest one was with tested v12 in mind.
Today im only uses v12 for both Ios and Android. All major issues with both systems is fixed.

However.... http://www.glbasic.com/forum/index.php?topic=9166.0 states that it only works with v11 and that rather than have everything all over the forum its being kept in one place now, so if this is not the version, where is it?

Also is there a link as Ian stated for upgrading the SDK too?
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.

Ian Price

QuoteAlso is there a link as Ian stated for upgrading the SDK too?

Follow the topic here - http://www.glbasic.com/forum/index.php?topic=9166.0

There is a DROPBOX link with the latest updates in it - https://dl.dropboxusercontent.com/u/3236515/GreedyMouse/AndroidExtras.zip

:)

I came. I saw. I played.

spicypixel

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.

spicypixel

Right I've copied over the files into my version 11 GLB folder all went well however the AndroidSample.gbap doesn't even compile, not what I call a useful start, any ideas there Ian? :-/
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.

Ian Price

Ummm... No idea. Are you trying this on an OUYA? I think that demo was specifically for that (although I'm not too sure, as I don't have any other Android devices to test it on). Have you ensured that you've got all the appropriate icons in the proper folders - that can cause non-compilation issues. Do you get any error messages?

It definitely worked when I tried it (I know that's a really awful statement), but without any messages I can only hazard a guess or two.
I came. I saw. I played.

spicypixel

#13
I downloaded the big file with the Android Extras and SDK just downloading the 1.5.2 on its own now to see if the project works on its own as a seperate download. Its so confusing the way the downloads are not organised, arrrgh lol

Get this simply trying to make a Win32 build to start with.

Code (glbasic) Select

_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:4ebaa1d3 - 3D, NET
Wordcount:420 commands
compiling:

linking:
gpc_temp1.o:gpc_temp1.cpp:(.text+0x5e): undefined reference to `_android_JAVACALL'
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 1.8 sec. Time: 20:29
Build: 0 succeeded.
*** 1 FAILED ***


And for Android I get this

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:4ebaa1d3 - 3D, NET
Wordcount:420 commands
compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-14"
You can use "C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
%ANDROIDSDK% not set. Using GLBasic's default target-14, Android 4.0



.
BUILD STAGE 1: Create Icons for various size
'AndroidIcons.exe' is not recognized as an internal or external command,
operable program or batch file.
BUILD STAGE 2: Start compiler (android.bat)
Q:\Compiler\platform\android\bin\..\android-sdk-windows
Updated and renamed default.properties to project.properties
Updated local.properties
Added file C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android\build.xml
Added file C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
   [subant] No sub-builds to iterate on

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:650: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:691: null returned: 1

Total time: 3 seconds
.
BUILD STAGE 4: Build a release build
   [subant] No sub-builds to iterate on

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:650: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:691: null returned: 1

Total time: 3 seconds
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
HOW TO INSTALL? Install by invoke this command:
"Q:\Compiler\platform\android\bin\..\android-sdk-windows\platform-tools\adb.exe" install -r "C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android/bin/glbasic-debug.apk"
.
HOW TO SIGN? Sign it by invoke this command:
"Q:\Compiler\platform\android\bin\glb_code_sign.bat" "C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android"
.
Android=C:\Users\Snoop\Desktop\Android Extras\AndroidExtras\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 9.9 sec. Time: 20:32
Build: 1 succeeded.



This is using the separately downloaded AndroidExtras Sample and the Include SDK AndroidExtras Sample also. Same issue with both. All I did was try it after extracting????? Any Ideas?
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.

Ian Price

Yes - the sample (and no AndroidExtras specific code) will not compile for Windows. That's a standard error. It is a tad annoying, as I can't add things, test on Windows and then compile for Android. I have to compile for Windows shunt it over to the OUYA (or BlueStacks if it's open).

Have you tried compiling for Android?
I came. I saw. I played.