Blitzmax and android

Started by kamashin, April 29, 2020, 11:21:36

Previous topic - Next topic

Derron

API installs are pretty fast (1-2minutes) when running on an SSD.


I think newer NDKs did not provide a file needed (ANT or so?) so if I remember correctly it requires a bit of backend work in NG to use latest toolchains' tools :D
(Am not sure if I now mix that up with my last try to compile my first and only monkey-x-game with cerberus-x).


bye
Ron

kamashin

I m installing the ndk r11c, and i just changed my JAVA_HOME path cause it was pointing to C:\Program Files\Java\jdk-14.0.1, wich is weird since i'm supposed to be in 1.8.20, so i set it to C:\Program Files\Java\jre1.8.0_20 (weird part is i have yet another java folder, a third, name jdk1.8.0_05 and i mnot sur which one i m supposed to used.... what's the difference between jdk and jre....)
well for now, changing my JAVA_HOME doesn t change the message, ill see if if it does when combiend to the r11c ndk
for the rest, my config seems close to yours...

kamashin

I'm progressing, i think the path i set for java wasn't the right one, because now i got another message

Quote
[ 96%] Compiling:firepaint.bmx.gui.release.android.armeabi.c
[100%] Linking:firepaint
Buildfile: C:\Users\KamaShin\Downloads\firepaintAndroid\firepaintAndroid\android-project-firepaint\build.xml
BUILD FAILED
Target "debug" does not exist in the project "firepaint".
Total time: 0 seconds
Error creating apk
Process complete
i dont  know where this "target" is mentionned, i've checked all the files that are supposed to be in the android-project-firepaint, there is only one line mentionning "target", in default.properties:
Quotetarget=android-19

markcwm

#33
Okay, yes that Java path is wrong, it should be the JDK 1.8 or 1.7. Java 14 is the latest but it doesn't work on older Android versions like 5.1, to be backward compatible Android is stuck on Java 8. The JRE is runtime environment and it's the virtual machine, it's for running apps, the JDK development kit is for building apps. Here's a good Java guide.

The target in default.properties is the Android API target platform, 19 is 4.4.2. I think the error is just saying it couldn't build the file bin/firepaint-debug.apk, it seems that might be a problem with the Android SDK, maybe you have the wrong API installed, I installed 5.1 (api22) and 4.4.2 (api19).

kamashin

Actually, i've installed them all, using the android studio sdk manager

markcwm

Oh wait, I think your path to the Android SDK is wrong, you're pointing to "C:\Program Files\Android\Android Studio" which is the IDE, I have an older SDK which looked like "C:\android-sdk-windows" but they changed it so now you need to point to "C:\Users\*username*\AppData\Local\Android\Sdk".

Read section 2 here How to Install Android IDE and SDK and Get Started with Android Programming.

Also your path to Apache Ant is wrong, you have "C:\Users\*username*\Downloads\apache-ant-1.9.14-bin\apache-ant-1.9.14" but it should be "C:\Users\*username*\Downloads\apache-ant-1.9.14".

kamashin

The android path, i changed a long time ago, and yes it points to the appdata folder, and the apache ant folder is correct as i unzipped the ant folder in a folder i called ant so.... the double folder name is correct :D

kamashin

here's my recent custom.bmk
Quoteaddoption android.home "C:\Users\KamaShin\AppData\Local\Android\Sdk"
addoption android.sdk "C:\Users\KamaShin\AppData\Local\Android\Sdk"
addoption android.ndk "C:\Users\KamaShin\Downloads\android-ndk-r14b"
addoption android.toolchain.version "4.9"
addoption android.platform "14"
addoption ant.home "C:\Users\KamaShin\Downloads\apache-ant-1.9.14-bin\apache-ant-1.9.14"

Pingus

Please keep us updated :)
I tried building for Android a while back (~2 years) but gave up because of all the fiddle to do and no success, always stucking at a time or another, whatever the version, the paths etc...
But if BNG evolved and is still an option, I'm still interrested in knowing that it *can* work ;).

kamashin

It can probably work, but i stopped trying :D
actually i converted my Blitzmax code to AppGameKit, which took me 2 days (I struggled 4 days to try and have BMax make an apk, it took 15 seconds on AGK)
And the game is actually available on the Play Store here:
https://play.google.com/store/apps/details?id=com.kamashin.retrobrik

or can be downloaded for PC, here:
https://kamashin.itch.io/retrobrik

Pingus

Arghh, too bad  ::)
AGK is not an option to me for misc reasons but it is definitivly a good bet for its ease of use. Congrats on the release.

markcwm

Oh bother, well at least there's AGK. And well done to them for such a great product. Your game has nice artwork and sound. Sadly Blitzmax is poor when it comes to deploying on mobile, it's a shame you couldn't get it working but you're better off with AGK.

kamashin

Blitzmax has something AGK doesn t that i dearly miss: OOP
everything in agk is procedural, and, though it doesn work perfectly fine, the code is a tad more messy

other than that, it is indeed really simple to get your game in apk with no change whatsoever in the source