can't compile for android on 12.096

Previous topic - Next topic

spacefractal

It's not that issue here. I'm uses JFK 1.7. The original issue was icon issue incompatible eith API-8 sdk.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

SnooPI

keep cool spacefractal. it was just related to my personal experience and maybe help Beginner ;)

Beginner

#17
this is no fun anymore... It seems that I'm the dumbest assumable user!

I took the pc of my girlfriend (i5 with win7) and installed GLB 12.096 on it.
Then I used your InnoSetup to update some files.

Then I installed JDK to "C:\Program Files\java\jdk1.8.0_05" and set environment variable (Umgebungsvariable) of JAVA_HOME to "C:\Program Files\java\jdk1.8.0_05\bin\"

this is the result:
Quote
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:682fc331 - 3D, NET
Wordcount:173 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-18"
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-14, Android 4.0



.
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
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Updated project.properties
Updated local.properties
Added file C:\Projekte\glbasic\minion_on_the_run\distribute\Android\build.xml
.
BUILD STAGE 3: Build a debug build
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre8\lib\tools.jar
   [subant] No sub-builds to iterate on

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:720: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:734: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre8"

Total time: 5 seconds
.
BUILD STAGE 4: Build a release build
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre8\lib\tools.jar
   [subant] No sub-builds to iterate on

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:720: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\build.xml:734: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre8"
THIS IS CRAP!!! I SET JAVA_HOME TO C:\Program Files\java\jdk1.8.0_05\bin\

Total time: 5 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:\Projekte\glbasic\minion_on_the_run\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:\Projekte\glbasic\minion_on_the_run\distribute\Android"
.
Android=C:\Projekte\glbasic\minion_on_the_run\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 22.2 sek. Zeit: 11:05
Erstellen: 1 erfolgreich.


Yesterday I took also a notebook with Win7 and installed GLB and JAVA but also on the notebook I didn't get the compiler to work!!!

This sucks. :'(



Why is it that the compiler says JAVA_HOME is "C:\Program Files\Java\jre8"?
I set JAVA_HOME to "C:\Program Files\java\jdk1.8.0_05\bin\". Is there a file in GLB that sets another JAVA_HOME?

Am I the only person who can't compile for android?
@all other GLB 12 users: did you try to complie for android with success?


spacefractal

#18
The document did say it quite well, so the compiler could not find the sdk, due its tried to find it in bin/bin.

So C:\Program Files\java\jdk1.8.0_05\bin should have been C:\Program Files\java\jdk1.8.0_05

etc mine is set to C:\Program Files (x86)\Java\jdk1.7.0_25, and there is no issues with that jdk.

Im did do have similar trouble, but that was with glbasic v10, where jdk1.7 diddent works well, but have not have those kind of trouble with glbasic v12. So that part is fixed.

PS. Im take on a mini vaccation and will been away in few days, so im might been offline (this is nothing due this issue at all, im just away from my computer).

PPS. Make sure to look on the AndroidSample Project, because there is few more code required to get working.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Beginner

#19
I changed JAVA_HOME again.

The good news is that now I get an APK file. But there are still a lot of errors and warnings (see below).

The bad news is that the files doesn't work properly. On Samsung Galaxy S3 the app only shows a white screen.

I wrote a little "hello world" code and this works fine. But loadfont and setfont commands seems to be ignored.

It seems that there are problems on 2d commands.

Quote
_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.060 SN:682fc331 - 3D, NET
Wordcount:9 commands
compile+link:

running glb_build.bat
Using ANDROID_TARGET="android-18"
You can use "C:\Projekte\glbasic\GLBasic\test\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
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
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Das System kann den angegebenen Pfad nicht finden.
Updated project.properties
Updated local.properties
Added file C:\Projekte\glbasic\GLBasic\test\distribute\Android\build.xml
.
BUILD STAGE 3: Build a debug build
   [subant] No sub-builds to iterate on
    [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] C:\Projekte\glbasic\GLBasic\test\distribute\Android\src\com\glbasic\test\SDLActivity.java:849: warning: [deprecation] getBlockSize() in StatFs has been deprecated
    [javac]          {   int blockSize = stat.getBlockSize();
    [javac]                                  ^
    [javac] C:\Projekte\glbasic\GLBasic\test\distribute\Android\src\com\glbasic\test\SDLActivity.java:850: warning: [deprecation] getAvailableBlocks() in StatFs has been deprecated
    [javac]             int availableBlocks = stat.getAvailableBlocks();
    [javac]                                       ^
    [javac] 5 warnings

BUILD SUCCESSFUL
Total time: 1 minute 40 seconds
.
BUILD STAGE 4: Build a release build
   [subant] No sub-builds to iterate on
    [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] Note: C:\Projekte\glbasic\GLBasic\test\distribute\Android\src\com\glbasic\test\SDLActivity.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 3 warnings
[proguard] Note: there were 2069 duplicate class definitions.
[proguard]       You should check if you need to specify additional program jars.
[proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [iap_plugin-dev-13.0.0.jar:META-INF/MANIFEST.MF])
[proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [android-support-v4.jar:META-INF/MANIFEST.MF])
[proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [google-play-services.jar:META-INF/MANIFEST.MF])
[proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [gson-2.2.2.jar:META-INF/MANIFEST.MF])
[proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [ouya-sdk.jar:META-INF/MANIFEST.MF])
[proguard] Warning: can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [in-app-purchasing-1.0.3.jar:META-INF/MANIFEST.MF])

BUILD SUCCESSFUL
Total time: 1 minute 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:\Projekte\glbasic\GLBasic\test\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:\Projekte\glbasic\GLBasic\test\distribute\Android"
.
Android=C:\Projekte\glbasic\GLBasic\test\distribute\Android
erfolgreich
_______________________________________
*** Fertig ***
Dauer: 173.7 sek. Zeit: 12:29
Erstellen: 1 erfolgreich.



spacefractal

#20
Yes there is errors, but that normal. Don't worry about them.

Checkout readme.txt for the important about assest files, it's require a bit of integration to get working. This is required to skips the .... Loading screen. You can also checkout android extras sample and see how the checkAssest() function works. That is required now.

The android sample is in th api 18 dir under android folder. Check it out.

But at least the compiler works, now it's time to get AndroidExtras integrated.

I'm out now, but get Ian price to help you. I'm back in few days.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

Beginner

Many thanks for your patience and your kind help. Have some nice holidays.

MrTAToad

#22
Android does work fine - those errors could be due to how you use AndroidExtras, so I can't help there unfortunately.

You MUST use the 32-bit Java SDK

LoadFont and SetFont work fine - what you need to do is make sure that all graphic files and other stuff are in the Media directory.  Also note that files are case-sensitive.

If your Android device is set to allow unknown sources, could you give this test program a quick try : http://www.gipegu.com/TSetup/Demo_release.apk

I tried it on my ICS Tokio Techbook II (apparently Sega Amusements give these out as prizes in Japan), and it zips along at a fair old rate.

Beginner

the demo_release.apk works fine on my S3. Reminds me to a rollercoaster.  :)

Ian Price

Yeah, make sure you use the asset system of Android Extras as that makes loading and using media MUCH easier than GLBasic's own commands (well, you still use them technically, but GLB has major path issues with Android, which AE solves).

The good thing about Android Extras is it also gives you much more flexibility over the Android formats you can compile for (including OUYA and GameStick) and allows different controllers to be used. It also allows In App Payments, so that you can offer a free demo and users can buy the full package in-game.

As SpaceFractal said, if you've got any questions about AE then I can help with that. :)
I came. I saw. I played.

MrTAToad

Quote from: Beginner on 2014-Apr-21
the demo_release.apk works fine on my S3. Reminds me to a rollercoaster.  :)
Its going to be my new game :)

SnooPI

Quote from: MrTAToad on 2014-Apr-21
Android does work fine - those errors could be due to how you use AndroidExtras, so I can't help there unfortunately.

it's probably why I have no problem with 12.096 and jdk 1.6 : I don't use AndroidExtra (and probably that's why I could not understand the icon problem of spacefractal)

Quote from: spacefractal on 2014-Apr-19
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).

I don't have this problem. I have different size icon in my .apk and it work fine on kindle fire HD and nexus 7.
Very strange  :(

Quote from: Ian Price on 2014-Apr-21
it (Android Extras) also allows In App Payments, so that you can offer a free demo and users can buy the full package in-game.

hmm very interesting  :good:

erico

I´m running jdk1.6 here and everything is fine so far.
I´m glad your troubles are getting fixed, first time android setup is a bit hard, but later all goes fine.

spacefractal

I'm on mobile away, Etc. Setup can been quite annoying, same with iOS. But when first working, then no problemo.

The first build errors is due icons as I'm checked. Not sure why, but soon I'm compiled with API -18 then it's fixed its self.

Android extras do have extra features and extend glbasic. Etc orientation issue most important fix, then the assest system is faster.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

spacefractal

#29
im back again.

mightbeen jdk 1.7+ dosent like the near four years old sdk 2.2? of course a newer sdk uses a newer jdk. That above could been why im got those trouble as well in a stock glbasic? So its could like have been a jdk issue in the end. But why uses old sdk? im not see jdk 1.6 on the homepage at all anyway.

But because sdk 4.3 is quite much newer (its just under a years old), its should works with jdk 1.8, but im do not have tested it. Its does works with jdk 1.7 without issues here.

The newest version is sdk 4.4 (KitKat), have chosen not use that yet by now, but chose to wait to upgrade to that.

But for AndroidExtras,  sdk 2.2 is deprecated.

Also when you compile with A, you will see somw warnings as well deprecated warnings, dont worry about this. A few important feature got deprecated in API-18 (a variable require a LONG rather a INT), but want to support API-17 and below as well. So this cant been avoided at all. The warnings you see in Proguard is from few apis, not used by AE.

To get it working with AE, you do need to do few extra code to get Media files working. See AndroidSample.gbap demo, how the files got loaded.

Also some Android devices does not like drawing commands. This is not a limit in glbasic, but in OpenGl implementation.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/