Error compile Android

Previous topic - Next topic

Kyo

I installed GLBasic ver  11.599 and I tried to use Android Extras.

Now I get this error:

Code (glbasic) Select

compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-8"
You can use "C:\Users\User—\Desktop\WorK_Game\Gioco\Game\FX_Game\EX_Fight\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
Added file C:\Users\Userù\Desktop\WorK_Game\Gioco\Game\FX_Game\EX_Fight\distribute\Android\build.xml
Updated file C:\Users\Userù\Desktop\WorK_Game\Gioco\Game\FX_Game\EX_Fight\distribute\Android\proguard.cfg

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

Total time: 5 seconds
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...

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

Total time: 1 second
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
finished Android build-script.
Android=C:\Users\Userù\Desktop\WorK_Game\Gioco\Game\FX_Game\EX_Fight\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 66.0 sec. Time: 03:55
Build: 1 succeeded.


And I do not compile the APK ...

I tried to uninstall and GLBasic I reinstalled version 10 with web update, but I get the same error...
I tried to restore the system to two days ago, but nothing works ....

What can I do?? PLEASE  :rant: :rant: :rant: :rant:  :nw: :nw: :nw:

spacefractal

#1
You need the api 16 upgrade. The android extras is not designed with gl basic stock sdk api 8.

There is a 160mb download in the inline forum:
http://www.glbasic.com/forum/index.php?topic=9341.0
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

MrTAToad

Also make sure an icon has been created in your projects distribute/res/drawable directory.  GLBasic won't re-create it if you cleanup everything - you would then need to copy it from somewhere else.

spacefractal

It's a manifest XML issue, due using unsupported v2.2 feature.

In v3 download the icon issue have been fixed, also supports tables too (using icon.png or icon128.png).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

Summing:

- I installed Gl_Basic 11.599
- I delete the ANdroid folder in C:\Program Files (x86)\GLBasic_v11\Compiler\platform
- I copy the new Android folder (Android_Api14+16_glbasic_v3)
- I compile the Android Sample for test

This is the result of compile:

Code (glbasic) Select

compile+link:
running Android build-script...
.
BUILD STAGE 1: Create Icons for various size
icon.png was found in the source dir, but not icon128.png.
icon.png should been 512x512px in size and icon128.png is in 128x128px.
Im will do use icon.png for resizing for tablet support.
ouya_icon.png is missing in source dir (if you use OUYA)
The icon size for OUYA is 732x412 px size.
BUILD STAGE 2: Start compiler (android.bat)
Q:\Compiler\platform\Android\bin\..\android-sdk-windows
Updated project.properties
Updated local.properties
Added file C:\Program Files (x86)\GLBasic_v11\Compiler\platform\Android\AndroidExtras\distribute\Android\build.xml
Updated file C:\Program Files (x86)\GLBasic_v11\Compiler\platform\Android\AndroidExtras\distribute\Android\proguard-project.txt
.
BUILD STAGE 3: Build a debug build
   [subant] No sub-builds to iterate on

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

BUILD SUCCESSFUL
Total time: 13 seconds
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
BUILD STAGE 5: Install by invoke this command:
"Q:\Compiler\platform\Android\bin\..\android-sdk-windows\platform-tools\adb.exe" install -r "C:\Program Files (x86)\GLBasic_v11\Compiler\platform\Android\AndroidExtras\distribute\Android/bin/glbasic-debug.apk"
.
finished Android build-script.
Android=C:\Program Files (x86)\GLBasic_v11\Compiler\platform\Android\AndroidExtras\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 77.7 sec. Time: 15:36
Build: 1 succeeded.



- GL-Basic not install in my device (Debug mode)
- I copy the glbasic-debug.apk in my smartphone and install it
- when stat the screen it's black  and after some time returns to the menu Android

I change the Android\bin\glb_build.bat form --target "android-16" to --target "android-14" but the resul it's the same ...

where am I wrong?

spacefractal

can you give me the _Logview.bat Logcat (Compiler\platform\Android\bin)?

Im thinks its a bug im just fixed today and then im reuploade a new version (to bad im cant remember all changes). Im got it work again for 11.556.

Its seen there is a new version, so im need to test its works on that too, before im uploading.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

mmmm ....
I do not know if I understand correctly ....
but this is the contents of the file _Logview.bat file

Code (glbasic) Select

@ECHO OFF

:: install Android SDK, Android NDK
:: install JDK


set HERE=%~dp0

set ANDROIDSDK=%HERE%..\android-sdk-windows
set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_24


set PATH=%JAVA_HOME%\bin;%PATH%

"%ANDROIDSDK%\platform-tools\adb.exe" shell logcat glbasic:I SDL:I DEBUG:I AndroidRuntime:E *:S
::

IF "%NOPAUSE%"=="" PAUSE



my JAVA_HOME it's = C:\Program Files (x86)\Java\jdk1.7.0_05

spacefractal

just invoke it, and then you would get STOUT outputs. Then its should output which java error it got. Also im have never liked the stock assest system, which see go nowhere with bigger assest files. So im uses my in house system.

Here its crashed once, but worked on a restart.

Im doing some fixes and reupload a v4 with included AndroidExtras, that one worked nice with 11.559.

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Ian Price

QuoteIm doing some fixes and reupload a v4 with included AndroidExtras, that one worked nice with 11.559.
:)
I came. I saw. I played.

Kyo

Thanks spacefractal ...  :nw:
so I can fix the problem of latency audio and have the controller OUYA ...  :booze:

Kyo


ooops the result of invoke _Logview.bat
Code (glbasic) Select

C:\Program Files (x86)\GLBasic_v11\Compiler\platform\Android\bin> _Logview.bat
adb server is out of date.  killing...
* daemon started successfully *
error: device not found
Premere un tasto per continuare . . .

spacefractal

you need apb running and connected to your pc, or its would not log anything at all. Property you need install such a driver for your device.

Then you could install directly with adp, but drivers can been somewhere messy sometimes (and dont forget to enable unknown source as well usb debugger thing on your device).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Kyo

With original android folder the install of apk worked perfectly ... how can I reactivate it manually?

I tested the V4 and  with Android sample v1.5 does not work, but it work fine with the older version of Android sample.

I noticed that the screen goes to sleep (autofade off) how can I fix it?

spacefractal

#13
im look on the sample again, howover the functions its self should been ready to uses, even the sample might not work correctly.

Edit:
Some sort if assets issues. you should really get logcat to wrk. Big help fixing issues, and I'm ran out of time (so its was too untested, sorry).

I'm fix rest of the issues tomorrow and post a new sample.

Howover if you got a blank screen, then it's have compiled correctly.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

im have just got the example to work. The main reason is a bug in SETCURRENTDIR$() and need doing some workaround about it.

That command do only change the path for glbasic c++ part, but never for java, which was still on the main path. That hence the example to hang, because its waited for the sound, which was never happens.

Also im also added hot my own CheckAssest file work, so you dont need to see the ..... screen anymore.

im update to the full android sdk file as well in the ANDROIDEXTRAS little file as well (so you dont need do a another 160mb download).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/