Building minetest for android on Linux

Post Reply
User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Building minetest for android on Linux

by MisterE » Post

1) install android studio

I'm on manjaro-linux, so this was my guide. For other linux distros, there will be other methods.
https://linuxhint.com/install-android-s ... -linux-21/

2) set up a folder for building minetest in, and download the source:
cd ~
mkdir minetest_android
cd minetest_android
git clone https://github.com/minetest/minetest
cd minetest
git clone --depth 1 https://github.com/minetest/minetest_game.git games/minetest_game
git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt

3) open android studio:
(if you have a project open then click File > Close Project)

click open, and select ~/minetest_android/minetest/android as the folder to open:
Screenshot from 2022-11-13 13-48-09.png
Screenshot from 2022-11-13 13-48-09.png (70.46 KiB) Viewed 948 times
click trust project.

It will load for a while.

After it loads, if it wants to upgrade gradle, ignore it. I went ahead and improved Android studio performance though.

That made Android studio restart.
Screenshot from 2022-11-13 13-48-09.png
Screenshot from 2022-11-13 13-48-09.png (70.46 KiB) Viewed 948 times
Next, click Build > Generate Signed Bundle / APK
Screenshot from 2022-11-13 13-48-09.png
Screenshot from 2022-11-13 13-48-09.png (70.46 KiB) Viewed 948 times
Attachments
Screenshot from 2022-11-13 13-56-44.png
Screenshot from 2022-11-13 13-56-44.png (69.68 KiB) Viewed 948 times
Screenshot from 2022-11-13 13-53-59.png
Screenshot from 2022-11-13 13-53-59.png (22.5 KiB) Viewed 948 times

User avatar
MisterE
Member
Posts: 693
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: Building minetest for android on Linux

by MisterE » Post

Click APK, and then Next:
Screenshot from 2022-11-13 13-58-03.png
Screenshot from 2022-11-13 13-58-03.png (33.36 KiB) Viewed 942 times
Under Key Store Path, click Create New.
Screenshot from 2022-11-13 14-00-44.png
Screenshot from 2022-11-13 14-00-44.png (70.45 KiB) Viewed 942 times
Under Key Store Path, choose a file location for your keys to be stored in. I chose my home folder, but I probably should have made a new folder for it.

Create and enter a password for the Key store and for the key (2 locations)

Put something in at least one of the info boxes where it asks for personal information. I put MisterE in the Organization box.

Click "OK" then enter your passwords that you created for the Key Store Password and for the Key Password.
In Key Alias, if the key you created is not selected, then click the folder icon and select it.

Click Next.

Note the destination folder and select the release build variant.:

Click Finish:


Gradle build will run. When it is finished, look in the destination folder for the apk!

If it errors, try Build > Clean Build > Clean Project, and then Build > Rebuild Project

My build was found in minetest/android/app/ build/outputs/apk/debug
Attachments
Screenshot from 2022-11-13 14-08-11.png
Screenshot from 2022-11-13 14-08-11.png (19.92 KiB) Viewed 942 times

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests