can't compile for android on 12.096

Previous topic - Next topic

Beginner

Hey guys,

yet another android compiler problem thread:

I just installed GLB 12.096. This is what the compiler says when trying to compile for android:

Quote
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:30cee243 - 3D, NET
Wordcount:173 commands
compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-8"
You can use "C:\Projekte\GLBasic\minion_on_the_run\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 and renamed default.properties to project.properties
Updated local.properties
Added file C:\Projekte\GLBasic\minion_on_the_run\distribute\Android\build.xml
Updated file C:\Projekte\GLBasic\minion_on_the_run\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: 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...

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:\Projekte\GLBasic\minion_on_the_run\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 8.4 sek. Zeit: 08:39
Erstellen: 1 erfolgreich.

Any ideas?


Schranz0r

did you get the *.apk in the distribute-folder?
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Beginner

no. There is no apk in the "\distribute\android\bin" folder

spacefractal

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

Beginner

Yes, Java jdk1.7.0_09 was installed and JAVA_HOME was set.

I just updated to jre7 and changed the JAVA_HOME setting. But no result. Still no APK.

Some month ago there was no problem in compiling my apps for android. All worked very well. But then I took a GLB. Some days ago I tried again but it doesn't work anymore. I already removed the android sdk and installed a new one. Tried differend versions.

I guess the problem is somewhere on the android-sdk.

Today I installed GLB 12.096 completely new.

This is the present error I get:
Quote
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:30cee243 - 3D, NET
Wordcount:173 commands
compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-8"
You can use "C:\Projekte\GLBasic\minion_on_the_run\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:\Projekte\GLBasic\minion_on_the_run\distribute\Android\build.xml
Updated file C:\Projekte\GLBasic\minion_on_the_run\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: 1 second
Picked up _JAVA_OPTIONS: -Xms256m -Xmx512m
.
BUILD STAGE 2: Build DEBUG and install on device
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
     [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:\Projekte\GLBasic\minion_on_the_run\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 6.5 sek. Zeit: 11:42
Erstellen: 1 erfolgreich.

MrTAToad

I suspect its to do with a lack of suitable icon in the project directory.  You need at least the icon.png file

spacefractal

#6
confirmed.

Its a major bug in glbasic 12.096 (here im downloaded the stock glbasic and installed on the default directoy, where that one im uses with AE is in different directory).

even when icon.png is added in the main dir (in C:\Projekte\GLBasic\minion_on_the_run), its dosent create icons correctly and only creating the extra icons in that dir, but is nwer moved into the Android Resources dir and hence the compile fails.

That is a important bug.

This issue is fixed with AndroidExtras, which uses a much newer more modern android SDK (api-18 rather than api-8).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Beginner

so what do I exactly have to do to solve this problem?

spacefractal

#8
try to add icon.png first to the folder with your source files and eventuelly removes other png icons that might been there (etc im looking on this problem for a workaround).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#9
Today its confirmed - SDK Android 2.2 (API-8), which is used by stock glbasic is simply out of date, and does not work anymore!!!

Im found its a icon resource issues, and im could not get it fixed and diddent find a sovle at all, which is quite crap. Im guess its due glbasic v12.0 adding quite different size icons, which is NOT supported by API-8, but require around API-10 (Android 3.0) to work. API-8 is also soooo old anyway (its near 4 years old).

Here im have tested with stock glbasic api-8 against glbasic with AndroidExtras with api-18. Karma Miwa did have extractly same compile issues after im deleted all icons except icon.png, and got stock there as well, but only if im tried to do that with api-8, but worked fine with api-18 (today im do fixes other icon issues, so you have more control over your icons, but this is a different issue).

Howover in the end, upgrade SDK to API-18 (which is Android 4.3) is quite easy and only require to replace a folder in glbasic folder (GLBasic_v12\Compiler\platform\android). The upgrade can been found here:
http://www.glbasic.com/forum/index.php?topic=9644.0

please note:
Assests files might fails, but that due missing Android.Check_Asset("yourfile") function, which is require before loading each media file (to skips the ... loading screen, which was unstable). That can been seen how to do that in AndroidSample project. Its not that hard in the end.

PS. Even its compiles with api-18, your app should still works on devices from api-9 and up, but supporting api-8 and below is deprecated.








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

Beginner

#10
At first I want to thank you for your efforts. This forum is great. HAPPY EASTER!!!  :booze:

Sadly the problem isn't solved yet.  :(

I used your link posted above and downloaded SDK API-18.
Then I took only the "android-sdk-windows" folder and made a copy to "C:\Program Files\GLBasic_v12\Compiler\platform\android".

The old "android-sdk-windows" in the GLB Folder I renamed to "BAK_..." before.

I deleted the distribute folder in my project and also all icons except "icon.png".

Then I tried again to compile (please see my notes in red below):

Quote

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:30cee243 - 3D, NET
Wordcount:173 commands
compile+link:
running glb_build.bat
Using ANDROID_TARGET="android-8"
You can use "C:\Projekte\GLBasic\minion_on_the_run\distribute\Android\glb_android_build.bat" to change the API level and SDK path. (this file doesn't exist in the mentioned folder)
%ANDROIDSDK% not set. (what does that mean?) Using GLBasic's default target-8, Android 2.2



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. (what is the path to android.bat?)
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:\Projekte\GLBasic\minion_on_the_run\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 8.5 sek. Zeit: 08:58
Erstellen: 1 erfolgreich.


spacefractal

you need to replace the whole android folder, not just android-sdk-windows. That why im included the full files this time. There is updated to quite many other files outside the sdk folder as well and many new Java code files to supports various things.

That why glbasic compiler is confuction to try to compile with api-8, which dosent exists anymore and then fails.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Beginner

#12
ok.

1st try:
I renamed the old android folder to "BAK_android". Then I put a copy of the new Android folder into place.
When I try to compile now I get a message "cc1plus.exe funktioniert nicht mehr. Es wird nach einer Lösung des Problems gesucht." (cc1plus.exe doesn't work anymore. Searching for a solution of the problem.")

2nd try:
I removed the new android folder and put the old android folder back in place. Then I put a copy of the new android folder into the old android folder and told windows to replace the old files by the new.
In the end the same here -> cc1plus.exe doesn't work anymore. 

I'm completely at a loss.  I just want to compile for android... why is it so hard???  :'(



spacefractal

#13
Sorry to delete posts. im did that to avoid various confuction. Sorry about that.

Just now im have updated Android Extras with SDK v4.3 Upgrade by using a InnoSetup installation script, which is being to been uploaded, which should been much better than the manual work, which might fail and get some security warnings (which im thinks that happens with the c++ exe one).

So uninstall and reinstall glbasic v12 (and eventuely make sure the compile fails correctly with the build error), and directly install this file top to your glbasic directory (the main one):
https://www.dropbox.com/s/xxy4ysqfj618f7u/setup-androidextras2-2-withsdk18-glbasic.zip

This only replace files in android/android-sdk-windows, few files in android/bin and android/templateproj. Rest is unchanged and not need updating at all. Android Extras - API 18 do just contain a sample project how to uses AE.

In the future all SDK upgrade will uses the InnoSetup script.

This is also posted in the AE section as well.

Hope that works better to fix the sdk-8 issue, which dosent work anymore with glbasic.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

SnooPI

I personally have had many problems with jdk 1.7.
Every time I went back to 1.6 and most of the problems were solved.