Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ProN3rd

#16
I am working on a 3d racing game. Everything works so far, got a nice racing course, a player who camera follows smoothly in loopings and such, as well as three enemies who drive on the track as well. Now, I wanted to apply lights and shading to everything and I read a lot in this forum and tries so many things, but cant make it work properly.

This is the code in short (often speaks more than thousand words):

Code (glbasic) Select

WHILE TRUE
X_MAKE3D 1, 1000, 90

//Setting the camera
X_CAMERAUP Cam.front, Cam.side, Cam.up
X_CAMERA Cam.x, Cam.y, Cam.z, Cam.dx, Cam.dy,Cam.dz

//Light Rendering
FOREACH e IN Enemies[]  //Three enemies in total, shall have a 90degree light at their front vector
X_SPOT_LT e.number, e.color,e.x, e.y, e.z, e.frontx, e.fronty, e.frontz, 90
  NEXT

//Object Rendering
FOREACH o IN self.object[];   //All objects are rendered (Racing course, Enemies, Players etc..)
X_MOVEMENT o.x,o.y,o.z
X_SETTEXTURE o.tex,-1
X_DRAWOBJ o.obj ,0
NEXT

X_MAKE2D
SHOWSCREEN
WEND


I tried to include the command:
Code (glbasic) Select

X_SPOT_LT -3, color,x,y, z, 0,0, 0, 360


after the pipeline, and rendered the object agains. I also tried the value of "-2" for toon shading and took some code from the examples file of glbasic:

Code (glbasic) Select

X_LOADSHADER(13, "shader/toon.vert", "shader/toon.frag")
  DIMDATA cheap[], .5, 1
    DIMDATA nice[], .3, .6, .6, .6, .6, .6, .6, .7, 1, 1, 1, 1, 1, 1, 1, 1
X_SETCELSHADES nice[]


however I cant get shadows working at all, and the lights  arenot very bright. I tried Cullmode 1 and -1 as well as using bump mapping and ambient light. I cant even describe what i did and what failed. I am just an amateuer and hope someone can explaine properly how can i achieve the following things:

draw the objects (racing course, vehicles)
4 bright Spotlights in total for each vehicle.
shading

enclosed a little screenshot (with only 1 enemy, and without skybox) I reduced everything to the bare minimum for these testings:

#18
yo cool danke für die infos. :)  nochmal ne zusammenfassung der anderen fragen:

wie krieg ich das Vögelchen animiert?

Sollte ich die  Objekte direkt an der richtigen Position erstellen, oder hinterher beim rendern mit X momvement an die richtige pos verschieben?

Soll ich normalen maps auch mit Loadbumptexture laden? oder nur die graustufen maps? meist sind ja nur normalen maps dabei. Wie lade ich sie am besten rein?
#19
Quote from: ProN3rd on 2015-Sep-11
EDIT: Das mit der Hecke hab ich hinbekommen. Ich hab sie nun ganz am Ende (nach allen anderen 3d Objekten) gerendert und nun gehts mit der Transparenz. Ist aber merkwürdig, die Reihenfolge sollte doch egal sein oder?

Hey liebe Leute,

ich versuch gerade diesen Vogel ans Laufen zu bringen: http://opengameart.org/content/evil-crow-creature :)

Hab die neuste Version von Blender geladen und das Ganze als 3ds exportiert. Mit dem GL Tool dann in ddd umgewandelt. Bei der Konvertierung werden mir auch 101 frames angezeigt. Das Problem ist das aber nur der erste frame angezeigt wird:

X_DRAWANIM vogel, 0, 101, permil, TRUE

auch mit X_DRAWOBJ vogel, frame, seh ich nur etwas wenn frame auf 0 steht.

Die zweite Frage: hab auch eine obj Hecke konvertiert und reingeladen ( http://opengameart.org/content/free-hedges)
hier erhalte ich allerdings schwarze Flächen die nicht ausgeblendet werden. Hab die Einstellungen (X_MIPMAPPING TRUE; X_CULLMODE 1) und auch verschiedene Sachen mit den Texturen probiert (png vs BMP, mit ohne alpha),

anbei ein screenshot


p.s noch eine kleine Frage: Sollte ich die  Objekte direkt an der richtigen Position erstellen, oder hinterher beim rendern mit X momvement an die richtige pos verschieben?

eine weitere frage; soll ich normalen maps auch mit Loadbumptexture laden? oder nur die graustufen maps? meist sind ja nur normalen maps dabei. Wie lade ich sie am besten rein?
#20
EDIT: Das mit der Hecke hab ich hinbekommen. Ich hab sie nun ganz am Ende (nach allen anderen 3d Objekten) gerendert und nun gehts mit der Transparenz. Ist aber merkwürdig, die Reihenfolge sollte doch egal sein oder?

Hey liebe Leute,

ich versuch gerade diesen Vogel ans Laufen zu bringen: http://opengameart.org/content/evil-crow-creature :)

Hab die neuste Version von Blender geladen und das Ganze als 3ds exportiert. Mit dem GL Tool dann in ddd umgewandelt. Bei der Konvertierung werden mir auch 101 frames angezeigt. Das Problem ist das aber nur der erste frame angezeigt wird:

X_DRAWANIM vogel, 0, 101, permil, TRUE

auch mit X_DRAWOBJ vogel, frame, seh ich nur etwas wenn frame auf 0 steht.

Die zweite Frage: hab auch eine obj Hecke konvertiert und reingeladen ( http://opengameart.org/content/free-hedges)
hier erhalte ich allerdings schwarze Flächen die nicht ausgeblendet werden. Hab die Einstellungen (X_MIPMAPPING TRUE; X_CULLMODE 1) und auch verschiedene Sachen mit den Texturen probiert (png vs BMP, mit ohne alpha),

anbei ein screenshot


p.s noch eine kleine Frage: Sollte ich die  Objekte direkt an der richtigen Position erstellen, oder hinterher beim rendern mit X momvement an die richtige pos verschieben?
#21
EDIT: solved it, i figured some pixel values were not set as INTEGERs, what caused the errors in the assignment to the array

I have been working on a portal based rendering graphics engine, like DukeNukem, Shadow Warrior and the like, where the screen gets renderened in vertical lines. For each x coordinate there are at least three y- lines (floor,main,ceiling), and often more when other sectors are seen through respective portals.

Everything works fine and smooth, until i started using the setpixel instruction instead of drawline. I figured out from the forum that setpixel does not use opengl and is quite slow therefore.

However to apply textures and lightning, i need individual pixel access, so i had the idea to write the pixels to a pixel buffer instead of drawing immediate points. I think this is also the way its done with SDL c++.

Anyway the following code works horrible. It works somehow and has quite good speed compared to setpixel but I can barley recognize the scene: between 50k and 70k pixels are lost out of 307.000 (640 x 480) and dont get rendered at all, it seems like.

How can i deal with this?

Code (glbasic) Select

GLOBAL W = 640, H = 480
LOADSPRITE "texture.png", 0  //640x480 dummy
GLOBAL pix%[];SPRITE2MEM(pix%[], 0);
MEM2SPRITE(pix%[], 1, W, H)  //work with this copy

WHILE TRUE
  CalculatePixels()  // All pixels get assigned in here
  MEM2SPRITE(pix%[],1,W,H)
  DRAWSPRITE 1, 0,0
  Showscreen
WEND
#22
thanks you for all your help, really appreciate this.

I have to do some testings then I will create a new thread about this. I thought the easiest way might be to still calculate everything based on 640x480, but the rendering coordinates will be adjusted based on the devices resolution, either with stretchsprite or with polyvector
#23
thank you SF the compiling works. I am using BlueStacks now and it works like a charm.
I have installed also your sample from AE extras, nice job.

remains a mystery though why it didnt work on Android SDK, i have tried so many things, but I can change the resolution of BlueStacks, to emulate various devices for my testings :)

Now, i was wondering how to change my code from my tile based game to fit all possible screen resolutions. I did calculate the max possible tilesize depending on the devices GETSCREENSIZE, and rendering with STRETCHSPRITE. So far it works but it is just a test project, i have several hundreds of sprites in my game. Also the walking speed and everything will be relative to Tilesize. I cant image all the changes :D . How would you guys approach this?

Maybe I should create another thread for this.  =D
#24
i ran the logview.bat and this is the result:

unfortunately i dont have a real device yet, i was hoping wo emulate it at first :)

downloading bluestacks now
#25
ok i used the debug version glbasic-debug.apk, but on the virtual device i always get the message:

unfortunatly <app name> has stopped.

maybe me code is wrong because its very simple test, but I get this all the time when i install glbasic apk, even those ones that should be working. What can i do to prevent that?
#26
thank you SF,

i have removed the ANT_HOME variables and also cleared the Path variable, i am testing on API 19 now again with a brand new project:

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.053 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-19"
You can use "C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
%ANDROIDSDK% not set. Using GLBasic's default target-19, Android 4.4 (KitKat

Checking Icons (uses 'AndroidExtras_icons_X.png' For changes)....
C:/Users/Gans/Documents/GLBasic/test5/distribute/Android
C:/Users/Gans/Documents/GLBasic/test5/icon_36_AndroidExtras.png is missing (36x36 size)
C:/Users/Gans/Documents/GLBasic/test5/icon_36_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test5/icon_36_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test5/distribute/Android/res/drawable-ldpi/icon.png
C:/Users/Gans/Documents/GLBasic/test5/icon_48_AndroidExtras.png is missing (48x48 size)
C:/Users/Gans/Documents/GLBasic/test5/icon_48_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test5/icon_48_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test5/distribute/Android/res/drawable-mdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test5/icon_72_AndroidExtras.png is missing (72x72 size)
C:/Users/Gans/Documents/GLBasic/test5/icon_72_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test5/icon_72_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test5/distribute/Android/res/drawable-hdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test5/icon_96_AndroidExtras.png is missing (96x96 size)
C:/Users/Gans/Documents/GLBasic/test5/icon_96_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test5/icon_96_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test5/distribute/Android/res/drawable-xhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test5/icon_180_AndroidExtras.png is missing (180x180 size)
C:/Users/Gans/Documents/GLBasic/test5/icon_180_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test5/icon_180_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test5/distribute/Android/res/drawable-xxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test5/icon_192_AndroidExtras.png is missing (192x192 size)
C:/Users/Gans/Documents/GLBasic/test5/icon_192_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test5/icon_192_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test5/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test5/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
copy C:/Users/Gans/Documents/GLBasic/test5/icon_ouya_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test5/distribute/Android/res/drawable-xhdpi/ouya_icon.png
Checking Icons Finished...

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\Gans\Documents\GLBasic\test5\distribute\Android\build.xml
Added file C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
Buildfile: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at Q:\Compiler\platform\android\android-sdk-windows

-setup:
     [echo] Project Name: glbasic
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
     [echo] Resolving Build Target for glbasic...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\rsObj
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\rsLibs
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\gen
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\classes
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for glbasic...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 29 source files to C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

-post-compile:

-obfuscate:

-dex:
      [dex] input: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\classes
      [dex] input: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\ouya-sdk.jar
      [dex] input: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\gson-2.2.2.jar
      [dex] input: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\google-play-services.jar
      [dex] input: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\android-support-v4.jar
      [dex] input: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\openiab-0.9.7.2.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\ouya-sdk.jar -> ouya-sdk-d5509fac6ece22a5397c03855fbea858.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\gson-2.2.2.jar -> gson-2.2.2-7a42e307e18c3e4af900d9f9f2104010.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\google-play-services.jar -> google-play-services-9fddcea9b62cec7784285ef84ae95c84.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\android-support-v4.jar -> android-support-v4-8342a3c0af265d3004364599502a6efa.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\libs\openiab-0.9.7.2.jar -> openiab-0.9.7.2-f9cc4c465241b827bfb5e0e779e7224d.jar
      [dex] Converting compiled files and external libraries into C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\classes.dex...
       [dx] Merged dex A (72 defs/129.7KiB) with dex B (204 defs/179.5KiB). Result is 276 defs/371.6KiB. Took 0.1s
       [dx] Merged dex A (276 defs/371.6KiB) with dex B (155 defs/153.0KiB). Result is 431 defs/656.1KiB. Took 0.0s
       [dx] Merged dex A (431 defs/656.1KiB) with dex B (1869 defs/1854.6KiB). Result is 2300 defs/3087.3KiB. Took 0.1s
       [dx] Result compacted from 4504.9KiB to 2699.1KiB to save 1805.8KiB
       [dx] Merged dex A (2300 defs/3087.3KiB) with dex B (371 defs/436.8KiB). Result is 2671 defs/2699.1KiB. Took 0.3s
       [dx] Merged dex A (2671 defs/2699.1KiB) with dex B (169 defs/183.0KiB). Result is 2840 defs/3479.9KiB. Took 0.1s

-crunch:
   [crunch] Crunching PNG Files in source dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res
   [crunch] To destination dir: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res\drawable-hdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-hdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-hdpi\icon.png: 0% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res\drawable-ldpi\icon.png => C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-ldpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-ldpi\icon.png: 0% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res\drawable-mdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-mdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-mdpi\icon.png: 0% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res\drawable-xhdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-xhdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-xhdpi\icon.png: 68% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res\drawable-xhdpi\ouya_icon.png => C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-xhdpi\ouya_icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-xhdpi\ouya_icon.png: 73% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res\drawable-xxhdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-xxhdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-xxhdpi\icon.png: 78% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res\drawable-xxxhdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-xxxhdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable-xxxhdpi\icon.png: 94% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\res\drawable\icon.png => C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\res\drawable\icon.png: 63% size of source)
   [crunch] Crunched 8 PNG files to update cache

-package-resources:
     [aapt] Creating full resource package...
     [aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.

-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating glbasic-debug-unaligned.apk and signing it with a debug key...

-post-package:

-do-debug:
[zipalign] Running zip align on final apk...
     [echo] Debug Package: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\glbasic-debug.apk
[propertyfile] Creating new property file: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\build.prop
[propertyfile] Updating property file: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\build.prop
[propertyfile] Updating property file: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\build.prop
[propertyfile] Updating property file: C:\Users\Gans\Documents\GLBasic\test5\distribute\Android\bin\build.prop

-post-build:

debug:

BUILD SUCCESSFUL
Total time: 23 seconds
.
BUILD STAGE 4: Build a release build
   [subant] No sub-builds to iterate on
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

BUILD SUCCESSFUL
Total time: 4 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\Gans\Documents\GLBasic\test5\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\Gans\Documents\GLBasic\test5\distribute\Android"
.
Android=C:\Users\Gans\Documents\GLBasic\test5\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 33.7 sek. Zeit: 22:03
Erstellen: 1 erfolgreich.


I get the apk file but, it doesnt install automatically. when doing manually i get "Unforunately <-App name > has stopped" on the virtual device. I get this message everytime I install a glbasic coded apk file. Even those which should be working. I installed other apk and they work.

#27
18) changing the bat file to Android-18, new project test3.

19)
Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.053 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-18"
You can use "C:\Users\Gans\Documents\GLBasic\test3\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
%ANDROIDSDK% not set. Using GLBasic's default target-19, Android 4.4 (KitKat

Checking Icons (uses 'AndroidExtras_icons_X.png' For changes)....
C:/Users/Gans/Documents/GLBasic/test3/distribute/Android
copy C:/Users/Gans/Documents/GLBasic/test3/icon_36_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test3/distribute/Android/res/drawable-ldpi/icon.png
copy C:/Users/Gans/Documents/GLBasic/test3/icon_48_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test3/distribute/Android/res/drawable-mdpi/icon.png
copy C:/Users/Gans/Documents/GLBasic/test3/icon_72_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test3/distribute/Android/res/drawable-hdpi/icon.png
copy C:/Users/Gans/Documents/GLBasic/test3/icon_96_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test3/distribute/Android/res/drawable-xhdpi/icon.png
copy C:/Users/Gans/Documents/GLBasic/test3/icon_180_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test3/distribute/Android/res/drawable-xxhdpi/icon.png
copy C:/Users/Gans/Documents/GLBasic/test3/icon_192_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test3/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test3/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
copy C:/Users/Gans/Documents/GLBasic/test3/icon_ouya_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test3/distribute/Android/res/drawable-xhdpi/ouya_icon.png
Checking Icons Finished...

BUILD STAGE 2: Start compiler (android.bat)
Q:\Compiler\platform\android\bin\..\android-sdk-windows
Error: Target id 'android-18' is not valid. Use 'android.bat list targets' to get the target ids.
.
BUILD STAGE 3: Build a debug build
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 4: Build a release build
Buildfile: build.xml does not exist!
Build failed
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\Gans\Documents\GLBasic\test3\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\Gans\Documents\GLBasic\test3\distribute\Android"
.
Android=C:\Users\Gans\Documents\GLBasic\test3\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 5.2 sek. Zeit: 20:20
Erstellen: 1 erfolgreich.


20) no apk file created

Summary: I had the biggest success with just installing the AE including API 19, however the APP doesnt install automatically, and when done by CMD, it wont open ("Unfortunatly <App name> has stopped")

Update: Meanwhile i tested everything with an emulated API 18 device, but this doenst change anything at all. I also tried to install an the  glbasic-debug-unaligned.apk file from the GLBasic_v12\Compiler\platform\android\Android Extras\AndroidSample.app\distribute\Android\bin folder but again: ("Unfortunatly <App name> has stopped")

Questions:
1) Is the code fine? i mean do i need to adjust any resolution things for the device? Its just a small test
2) What about the variable ANDROIDSDK does it need to be set?
3) maybe something is wrong with something else because the apk file from the extras folders wont open on the virtual device after installation?
3) What did I do wrong, why does this not work properly?
#28
Thank you guys for the comments, i still cant get this working, this is what i did in detail:

1) Fresh install of Java SDK (32 Bit) 7.0 Update 75,
2) JAVA_HOME = C:\Program Files (x86)\Java\jdk1.7.0_75
3) Fresh install of ANT
4) ANT_HOME = C:\Program Files (x86)\Java\apache-ant-1.9.4
5) Path = %ANT_HOME%\bin;  %JAVA_HOME%\bin
6) Android SDK manager is installed to C:\Android\android-sdk no ANDROIDSDK variable is set yet
7) All Build Tools and Extras within Android SDK are downloaded and installed
8 ) Device emulated: Android 4.4.2. Api Level 19 (willbe running in background from now on)

9) Downloaded GL Basic from the main site (SF`s link) and installed (Its version 12.308 and not v12.312), Restarting after installation. (All previous version were deinstalled, and registry was cleaned with CCleaner)

10) I have downloaded Android Extras 2.7.2 released  2015-Feb-05 , the first link where API 19 is included (http://www.glbasic.com/forum/index.php?topic=9644.msg83746#msg83746)

11) Also downloaded http://www.glbasic.com/forum/index.php?topic=9166.165 , but i think i dont need it its from  2015-Feb-03

12) Also downloaded sdl_main.zip from http://www.glbasic.com/forum/index.php?topic=10106.msg88735#msg88735 , but i think i dont need it

13) First testing without any addons, project settings = Android, newproject = test1
Code (glbasic) Select

WHILE TRUE
DRAWRECT 10,10,100,100,RGB(255,255,0)
SHOWSCREEN
WEND


14) error log would exceed 20.000 charachters so i just post some excerpts:

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.053 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-8"
You can use "C:\Users\Gans\Documents\GLBasic\test1\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



BUILD STAGE 1: Compile and pack RELEASE
Updated project.properties
Updated local.properties
Updated file C:\Users\Gans\Documents\GLBasic\test1\distribute\Android\build.xml
Updated file C:\Users\Gans\Documents\GLBasic\test1\distribute\Android\proguard.cfg

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:580: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:602: Compile failed; see the compiler error output for details.

Total time: 1 second
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
BUILD STAGE 2: Build DEBUG and install on device
     [echo] Gathering info for glbasic...
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Handling aidl files...
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
    [javac] C:\Users\Gans\Documents\GLBasic\test1\distribute\Android\src\com\glbasic\test\Downloads.java:6: error: cannot find symbol

...
    [javac] 79 errors
    [javac] 19 warnings

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:580: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:602: Compile failed; see the compiler error output for details.

Total time: 3 seconds
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
finished Android build-script.
Android=C:\Users\Gans\Documents\GLBasic\test1\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 9.0 sek. Zeit: 20:01
Erstellen: 1 erfolgreich.



15) Installing AE, new project test 2

16)

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.053 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-19"
You can use "C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\glb_android_build.bat" to change the API level and SDK path.
%ANDROIDSDK% not set. Using GLBasic's default target-19, Android 4.4 (KitKat

Checking Icons (uses 'AndroidExtras_icons_X.png' For changes)....
C:/Users/Gans/Documents/GLBasic/test2/distribute/Android
C:/Users/Gans/Documents/GLBasic/test2/icon_36_AndroidExtras.png is missing (36x36 size)
C:/Users/Gans/Documents/GLBasic/test2/icon_36_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test2/icon_36_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test2/distribute/Android/res/drawable-ldpi/icon.png
C:/Users/Gans/Documents/GLBasic/test2/icon_48_AndroidExtras.png is missing (48x48 size)
C:/Users/Gans/Documents/GLBasic/test2/icon_48_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test2/icon_48_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test2/distribute/Android/res/drawable-mdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test2/icon_72_AndroidExtras.png is missing (72x72 size)
C:/Users/Gans/Documents/GLBasic/test2/icon_72_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test2/icon_72_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test2/distribute/Android/res/drawable-hdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test2/icon_96_AndroidExtras.png is missing (96x96 size)
C:/Users/Gans/Documents/GLBasic/test2/icon_96_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test2/icon_96_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test2/distribute/Android/res/drawable-xhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test2/icon_180_AndroidExtras.png is missing (180x180 size)
C:/Users/Gans/Documents/GLBasic/test2/icon_180_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test2/icon_180_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test2/distribute/Android/res/drawable-xxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test2/icon_192_AndroidExtras.png is missing (192x192 size)
C:/Users/Gans/Documents/GLBasic/test2/icon_192_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/test2/icon_192_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test2/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/test2/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
copy C:/Users/Gans/Documents/GLBasic/test2/icon_ouya_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/test2/distribute/Android/res/drawable-xhdpi/ouya_icon.png
Checking Icons Finished...

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\Gans\Documents\GLBasic\test2\distribute\Android\build.xml
Added file C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
Buildfile: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
[checkenv] Android SDK Tools Revision 24.0.2
[checkenv] Installed at Q:\Compiler\platform\android\android-sdk-windows

-setup:
     [echo] Project Name: glbasic
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
     [echo] Resolving Build Target for glbasic...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\rsObj
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\rsLibs
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\gen
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\classes
    [mkdir] Created dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for glbasic...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 29 source files to C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

-post-compile:

-obfuscate:

-dex:
      [dex] input: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\classes
      [dex] input: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\ouya-sdk.jar
      [dex] input: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\gson-2.2.2.jar
      [dex] input: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\google-play-services.jar
      [dex] input: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\android-support-v4.jar
      [dex] input: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\openiab-0.9.7.2.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\ouya-sdk.jar -> ouya-sdk-d42275bbda60fcbbc73b30793b1e1fc5.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\gson-2.2.2.jar -> gson-2.2.2-c829a3bc9ea9df9195c79b76329ee971.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\google-play-services.jar -> google-play-services-95daa1613ceb81a207d749753c53282c.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\android-support-v4.jar -> android-support-v4-80c1a71df3db4eec01a3f5fcf8b6e815.jar
      [dex] Pre-Dexing C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\libs\openiab-0.9.7.2.jar -> openiab-0.9.7.2-4d76fade949e2bb020af1ec0812ede98.jar
      [dex] Converting compiled files and external libraries into C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\classes.dex...
       [dx] Merged dex A (72 defs/129.7KiB) with dex B (204 defs/179.5KiB). Result is 276 defs/371.6KiB. Took 0.1s
       [dx] Merged dex A (276 defs/371.6KiB) with dex B (155 defs/153.0KiB). Result is 431 defs/656.1KiB. Took 0.0s
       [dx] Merged dex A (431 defs/656.1KiB) with dex B (1869 defs/1854.6KiB). Result is 2300 defs/3087.3KiB. Took 0.1s
       [dx] Result compacted from 4504.9KiB to 2699.1KiB to save 1805.8KiB
       [dx] Merged dex A (2300 defs/3087.3KiB) with dex B (371 defs/436.8KiB). Result is 2671 defs/2699.1KiB. Took 0.3s
       [dx] Merged dex A (2671 defs/2699.1KiB) with dex B (169 defs/183.0KiB). Result is 2840 defs/3479.9KiB. Took 0.1s

-crunch:
   [crunch] Crunching PNG Files in source dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res
   [crunch] To destination dir: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res\drawable-hdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-hdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-hdpi\icon.png: 0% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res\drawable-ldpi\icon.png => C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-ldpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-ldpi\icon.png: 0% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res\drawable-mdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-mdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-mdpi\icon.png: 0% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res\drawable-xhdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-xhdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-xhdpi\icon.png: 68% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res\drawable-xhdpi\ouya_icon.png => C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-xhdpi\ouya_icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-xhdpi\ouya_icon.png: 73% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res\drawable-xxhdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-xxhdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-xxhdpi\icon.png: 78% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res\drawable-xxxhdpi\icon.png => C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-xxxhdpi\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable-xxxhdpi\icon.png: 94% size of source)
   [crunch] Processing image to cache: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\res\drawable\icon.png => C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable\icon.png
   [crunch]   (processed image to cache entry C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\res\drawable\icon.png: 63% size of source)
   [crunch] Crunched 8 PNG files to update cache

-package-resources:
     [aapt] Creating full resource package...
     [aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.

-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating glbasic-debug-unaligned.apk and signing it with a debug key...

-post-package:

-do-debug:
[zipalign] Running zip align on final apk...
     [echo] Debug Package: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\glbasic-debug.apk
[propertyfile] Creating new property file: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\build.prop
[propertyfile] Updating property file: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\build.prop
[propertyfile] Updating property file: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\build.prop
[propertyfile] Updating property file: C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\build.prop

-post-build:

debug:

BUILD SUCCESSFUL
Total time: 25 seconds
.
BUILD STAGE 4: Build a release build
   [subant] No sub-builds to iterate on
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.

BUILD SUCCESSFUL
Total time: 4 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\Gans\Documents\GLBasic\test2\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\Gans\Documents\GLBasic\test2\distribute\Android"
.
Android=C:\Users\Gans\Documents\GLBasic\test2\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 35.2 sek. Zeit: 20:09
Erstellen: 1 erfolgreich.


17) this time apk file is created but not installed. I ran CMD and write: adb install C:\Users\Gans\Documents\GLBasic\test2\distribute\Android\bin\glbasic-debug-unaligned.apk and app installes, however if i open it it sais "Unfortunately <APP Name> has stopped

to be continued see next post:
#29
Quote from: spacefractal on 2015-Feb-08
Property ant might been missing as Various required Builds tools?

Im Thinks you should remove ANDROIDSDK from the Path, so glBasic uses that one that is include.

Also im also uses Java JDK 1.7, not Java JDK 1.8.

Also make sure to restart after removing ANDROIDSDK var.

Ps. I'm checkout the none wifi crash in the few days.

ANT_HOME is set to C:\Program Files (x86)\Java\apache-ant-1.9.4
JAVA_HOME is set to C:\Program Files (x86)\Java\jdk1.7.0_75 (installed version 7 32Bit now)
PATH: %ANT_HOME%\bin;  %JAVA_HOME%\bin

i tested with and without the variable: ANDROIDSDK C:\Android\android-sdk
and always deinstalled and restarted everything for each try

with gl Basic 12:

Code (glbasic) Select


_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-19"
You can use "C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android\glb_android_build.bat" to change the API level and SDK path.

Checking Icons (uses 'AndroidExtras_icons_X.png' For changes)....
C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android
C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png is missing (36x36 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-ldpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png is missing (48x48 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-mdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png is missing (72x72 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-hdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png is missing (96x96 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png is missing (180x180 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png is missing (192x192 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_ouya_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xhdpi/ouya_icon.png
Checking Icons Finished...

BUILD STAGE 2: Start compiler (android.bat)
Q:\Compiler\platform\android\bin\..\android-sdk-windows
Error: Target id 'android-19' is not valid. Use 'android.bat list targets' to get the target ids.
.
BUILD STAGE 3: Build a debug build
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 4: Build a release build
Buildfile: build.xml does not exist!
Build failed
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\Gans\Documents\GLBasic\8feb\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\Gans\Documents\GLBasic\8feb\distribute\Android"
.
Android=C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 5.4 sek. Zeit: 18:07
Erstellen: 1 erfolgreich.







with GLBASIC 10:
Code (glbasic) Select


_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.104 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack RELEASE
     [echo] Gathering info for glbasic...
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Handling aidl files...
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
    [javac] C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android\gen\com\yourcompany\8feb\R.java:8: error: ';' expected
    [javac] package com.yourcompany.8feb;
    [javac]                        ^
    [javac] 1 error

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:580: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:602: Compile failed; see the compiler error output for details.

Total time: 0 seconds
.
BUILD STAGE 2: Build DEBUG and install on device
     [echo] Gathering info for glbasic...
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Handling aidl files...
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
    [javac] C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android\gen\com\yourcompany\8feb\R.java:8: error: ';' expected
    [javac] package com.yourcompany.8feb;
    [javac]                        ^
    [javac] 1 error

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:580: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:602: Compile failed; see the compiler error output for details.

Total time: 0 seconds
finished Android build-script.
Android=C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 4.7 sek. Zeit: 18:06
Erstellen: 1 erfolgreich.



is there somewhere I guide about this? I am just an amateur programmer who is very confused. After reinstalling and testing, also GLBASIC 10 wont compile anymore now for android, but it did yesterday. Is there a known configuration which works easy and has a guide?

EDit: I just tested the glbasic-debug-unaligned.apk from the C:\Program Files (x86)\GLBasic_v12\Compiler\platform\android\Android Extras\AndroidSample.app folder via CMD installation on API 17, the app installes, but when I open it the message "Unfortunately <APP Name > has stopped appears". I have seen this message yesterday as well when installing glbasic content on virtual devices either via CMD or with GLBasic10 (which installed yesterday, but not today any more.) I dont have the installer of GLBasic 11, can i find it somewhere? Hopefully I can make this work soon, trying for a few days desperatly now  :giveup:

#30
i have been trying for a few days now, and read a lot in this forum but i still cant figure out how to compile for android.
this is the code:
Code (glbasic) Select

WHILE TRUE
DRAWRECT 20,20,100,100,RGB(255,0,0)
SHOWSCREEN
WEND


i tested with GLBasic IDE, Version: 12.308 and now I use GLBasic IDE, Version: 12.096, the problems are the same:

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-8"
You can use "C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android\glb_android_build.bat" to change the API level and SDK path.



BUILD STAGE 1: Compile and pack RELEASE
Error: Target id 'android-8' is not valid. Use 'android.bat list targets' to get the target ids.
Build failed
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
BUILD STAGE 2: Build DEBUG and install on device
Buildfile: build.xml does not exist!
Build failed
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
finished Android build-script.
Android=C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 5.2 sek. Zeit: 04:39
Erstellen: 1 erfolgreich.


apk file is not created.

i have a freh installation of Java SDK (32 Bit) 8.0 Update 31, i use the variables:


  • JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0_31
    ANDROIDSDK: C:\Android\android-sdk
    Path: %JAVA_HOME%\bin

I have emulated various APIS from API 19 (4.4.2) onwards and various devices. I can install other (non gl basic coded) apk files on Android sdk.

Reply39 (in this thread) dropbox link  wont work any more, I tried it a few days ago but lost it during reinstalling.

I have also GLBasic IDE, Version: 10.202 installed, and it works there in so far as the app gets installed. But when I want to open it on the virtual device, it sais "Unfortunately <App Name> has stopped. I also tried the "ANDROTEST.apk" which I found in some thread here and which is known to work. However i get the same error message after installing via cmd.

For all test i delted icons and the distribute folder, or made entirely new projects. Please help me either make GLBasic IDE, Version: 10.202 work, or the new version. Is there a known configuration which works? What GLBasic IDE, JDK,Android API version run without errors?

EDIT: Now downloading and testing this from reply33 in this thread: http://www.glbasic.com/forum/index.php?topic=9166.msg90174#msg90174

the result is:
Code (glbasic) Select


_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-19"
You can use "C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android\glb_android_build.bat" to change the API level and SDK path.

Checking Icons (uses 'AndroidExtras_icons_X.png' For changes)....
C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android
C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png is missing (36x36 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-ldpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png is missing (48x48 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-mdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png is missing (72x72 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-hdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png is missing (96x96 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png is missing (180x180 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png is missing (192x192 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_ouya_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xhdpi/ouya_icon.png
Checking Icons Finished...

BUILD STAGE 2: Start compiler (android.bat)
Q:\Compiler\platform\android\bin\..\android-sdk-windows
Error: Target id 'android-19' is not valid. Use 'android.bat list targets' to get the target ids.
.
BUILD STAGE 3: Build a debug build
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 4: Build a release build
Buildfile: build.xml does not exist!
Build failed
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\Gans\Documents\GLBasic\8feb\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\Gans\Documents\GLBasic\8feb\distribute\Android"
.
Android=C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 7.6 sek. Zeit: 05:33
Erstellen: 1 erfolgreich.


still no apk file, a bunch of icons were created

EDIT 2: Now testing the Android icons from post 41 in this thread

Result: didnt change anything:

Code (glbasic) Select

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:bdf43d6f - 3D, NET
Wordcount:4 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-19"
You can use "C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android\glb_android_build.bat" to change the API level and SDK path.

Checking Icons (uses 'AndroidExtras_icons_X.png' For changes)....
C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android
C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png is missing (36x36 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_36_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-ldpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png is missing (48x48 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_48_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-mdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png is missing (72x72 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_72_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-hdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png is missing (96x96 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_96_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png is missing (180x180 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_180_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png is missing (192x192 size)
C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png is created
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_192_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xxxhdpi/icon.png
C:/Users/Gans/Documents/GLBasic/8feb/icon_ouya_AndroidExtras.png is missing (732x412 size)
the Ouya icon is not important, if you dont want to support the console
copy C:/Users/Gans/Documents/GLBasic/8feb/icon_ouya_AndroidExtras.png to C:/Users/Gans/Documents/GLBasic/8feb/distribute/Android/res/drawable-xhdpi/ouya_icon.png
Checking Icons Finished...

BUILD STAGE 2: Start compiler (android.bat)
Q:\Compiler\platform\android\bin\..\android-sdk-windows
Error: Target id 'android-19' is not valid. Use 'android.bat list targets' to get the target ids.
.
BUILD STAGE 3: Build a debug build
Buildfile: build.xml does not exist!
Build failed
.
BUILD STAGE 4: Build a release build
Buildfile: build.xml does not exist!
Build failed
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\Gans\Documents\GLBasic\8feb\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\Gans\Documents\GLBasic\8feb\distribute\Android"
.
Android=C:\Users\Gans\Documents\GLBasic\8feb\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 5.7 sek. Zeit: 05:44
Erstellen: 1 erfolgreich.


Spacefractal:
Property ant might been missing as Various required Builds tools?

Im Thinks you should remove ANDROIDSDK from the Path, so glBasic uses that one that is include.

Also im also uses Java JDK 1.7, not Java JDK 1.8.

Also make sure to restart after removing ANDROIDSDK var.

Ps. I'm checkout the none wifi crash in the few days.