APK compiling for Android (Armory06_beta_win64)

Hello all,

Since this is my first post, let me say I love Haxe, I love Blender, so obviously, I love Armory3D.

I have been prototyping a game for a while using Armory3D, waiting for a new release to check if finally I can get an APK (I’ve not been able to do with Armory05_beta nor Armory06_alpha) so I can test real case perfomance on mobile devices.

And it seems that… good news! But still having some problem (but I have an APK, which is a lot).

These are the steps I follow:

  1. Create a new project and call it “Hello_armory_06_beta” (yes, I’m so inspired).

  2. Go to Render, Armory Player, And play.

Everything seem to work properly, so I try to make an APK.

  1. I go to armory exporter, and export to Android C.

  2. Open android studio, and open the project inside android-native-hl-build folder.

  3. I go to build menu, build bundles/apk, build APK, and… It makes an APK!

The problem is that the app starts, but the cube is not rendered at all (all black), and a strange sound sounds intermittently.

This is the output log:

So i guess is something about GL or audio, but I’m a bit lost.

Can anyone help me? Thanks in advance :wink:

Hi!

Thanks for your kind post, happy to see there has been some progress and you get the .apk now.

Try going into Render - Armory Render Path and create a new Mobile path there. Then, when exporting the project in Render - Armory Exporter, fill in the Render Path option with Mobile. That should at least get the default cube going.

1 Like

Hi @lubos,

Thanks for your fast reply. FANTASTIC, It worked :slight_smile:

The only thing is that the intermittently sounds still happening (only on real device, not on emulator). The device is a Xiaomi Mi A1 with Android 9.

Maybe related to the libOpenSLES messages on uploaded image.

Of course this is a very little “but” also I understand that is version 0.6 and beta. I’m still VERY HAPPY to be able to make an APK since Krom is very usefull and fast for developing, but now I’ll be able to test input touch :blush:

Thank you for your amazing work.

2 Likes

Crazy. You really got an APK, or are you kidding ?
Can you tell me which size the exported APK has, as far as i can see its an empty scene (more or less, just a cube). Maybe you can do a small tutorial how you done it.

@lubos
Do you have plans to simplify the export procedure for mobiles, in any future update ?
Another Question: I don´t use AndroidStudio. Really don´t like it. I use intelliJ. Will there be step-by-step tutorials how to got it working (AndroidStudio / intelliJ or another IDE). Because of to many dependencies, it doesn´t work here.

Hi @sledge,

Here’s a link for the APK -> https://drive.google.com/file/d/18pca0bpC1fL7SdUn9WtBrLJW6ElCzHzO/view?usp=sharing

Just an empty scene, with a colored cube, and a 3 lines script for rotating it with fingers. 5MB. Sounds perfect IMO.

The “tutorial” on how get an APK in 0.6beta is so simple (but you need Android Studio, just use it for making the APK, nothing else, and well, the sound thing).

Just create an empty project, create a mobile path (thanks @lubos) and export to Android C (selecting the mobile path), open with Android Studio the projecte inside android-native-hl-build and just build the APK.

@sledge yes, wish to improve on that (both the export procedure and guide) in the future.

@McNito If you select the release build variant in Android Studio, you should get ~1MB. At least I hope so. :slight_smile: I have also got to fix the sound issue now, will do some more testing…

Capture2

(this is default cube only…)

4 Likes

Great @lubos, 1MB is so good :slight_smile:

Thanks.

The latest version of of Khamake ( the tool that powers Armory’s ability to create the Android Studio project ) it seems like it might be being updated so that it can compile the binary without using Android Studio or any other build tool at all ( other than the build tool Koremake, which comes with Armory ). I have an issue on GitHub because I ran into a problem with it, but I was able to compile the C code without Android Studio, I just don’t know how to take that and put it in an APK.

Anyway, this might help streamline android deployment in the future, I’m not sure. Armory might end up being able to just create an APK by itself.

Hey,

Thx for the file and the info ! 5mb is much more less than 12mb with unity empty scene.

@lubos
Crazy, if its 1mb !!! Smalles Android APK which support 3D, i´ve ever seen ! And glad, if you have plans to improve the mobile export stuff !

@zicklag
This sounds cool. I will investigate a lil bit into “Khamake”. Thanks !

2 Likes

@sledge I heard from somebody that you can skip Android Studio and just use gradlew to build the project.

Thx for the tip. I think i tried gradle, but without success. I need a tutorial / example project. It happens often, that a dependancy isn´t available and any versions not match. Plus it does not find stuff inside the exported armory peoject. Really hard, to figure out whats wrong. Even with an IDE.

do you guys have a whatsapp group for fast communication?

My Krom is just black when i run the game, help,

There is a Discord server:

I’ve been experimenting with command line APK generation. Having trouble getting it to successfully accept the licenses. Sdkmanager --licenses crashes (v11 is an incompatible version of Java, I suspect…)