May 31, 2020, 09:08:22 PM

Author Topic: Blitzmax and android  (Read 944 times)

Offline Derron

  • Hero Member
  • *****
  • Posts: 2975
Re: Blitzmax and android
« Reply #30 on: May 03, 2020, 07:29:40 AM »
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

Offline kamashin

  • Jr. Member
  • **
  • Posts: 31
Re: Blitzmax and android
« Reply #31 on: May 03, 2020, 10:36:31 AM »
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...

Offline kamashin

  • Jr. Member
  • **
  • Posts: 31
Re: Blitzmax and android
« Reply #32 on: May 03, 2020, 10:57:02 AM »
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:
Quote
target=android-19

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 454
Re: Blitzmax and android
« Reply #33 on: May 03, 2020, 10:31:36 PM »
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).

Offline kamashin

  • Jr. Member
  • **
  • Posts: 31
Re: Blitzmax and android
« Reply #34 on: May 04, 2020, 12:19:17 PM »
Actually, i've installed them all, using the android studio sdk manager

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 454
Re: Blitzmax and android
« Reply #35 on: May 04, 2020, 02:12:44 PM »
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".

Offline kamashin

  • Jr. Member
  • **
  • Posts: 31
Re: Blitzmax and android
« Reply #36 on: May 04, 2020, 04:42:45 PM »
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

Offline kamashin

  • Jr. Member
  • **
  • Posts: 31
Re: Blitzmax and android
« Reply #37 on: May 04, 2020, 04:45:15 PM »
here's my recent custom.bmk
Quote
addoption 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"

Offline Pingus

  • Jr. Member
  • **
  • Posts: 94
Re: Blitzmax and android
« Reply #38 on: May 18, 2020, 06:24:28 PM »
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 ;).

Offline kamashin

  • Jr. Member
  • **
  • Posts: 31
Re: Blitzmax and android
« Reply #39 on: May 18, 2020, 11:18:50 PM »
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

Offline Pingus

  • Jr. Member
  • **
  • Posts: 94
Re: Blitzmax and android
« Reply #40 on: May 19, 2020, 12:31:31 AM »
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.

Offline markcwm

  • Sr. Member
  • ****
  • Posts: 454
Re: Blitzmax and android
« Reply #41 on: May 19, 2020, 05:46:18 PM »
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.

Offline kamashin

  • Jr. Member
  • **
  • Posts: 31
Re: Blitzmax and android
« Reply #42 on: May 19, 2020, 07:25:27 PM »
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

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal