Langsung ke konten utama

How to export Godot game to Android from Linux


1.Go to Editor->Manage export template->Download and install->Close.


2.Download command-tools cli for linux at https://developer.android.com/studio/#command-tools

Scroll down until you see the Command line tools section.

Then add `export ANDROID_HOME="/path/to/android-sdk"` to your `.bashrc` or `.zshrc` (for other shell, try to edit it accordingly), and unzip the file to: `/path/to/android-sdk/`

Example: `$HOME/Android/android-sdk`


3.Download Openjdk latest version.

Set JAVA_HOME to your `.bashrc`: `export JAVA_HOME=$(which java|rev|cut -d'/' -f3-|rev)`


Install required tools&packages from sdkmanager: `$ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "platform-tools" "build-tools;34.0.0" "platforms;android-34" "cmdline-tools;latest"` "cmake;3.10.2.4988404" "ndk;23.2.8568313"

You can also choose which version you want to download, just playing around with the sdkmanager.


4.Go to Editor->Settings->Search for "SDK"->Set the Java Sdk path with `$JAVA_HOME` & Android Sdk path with `$ANDROID_HOME`

Just enter this on terminal to get them: `echo $JAVA_HOME&&echo $ANDROID_HOME`

Then copy the corresponding path into the Editor Settings. Then Close the Editor Settings.


If all Ok, then there shouldn't be any red errors appears afterwards.
Go to Project->Export->Add platform: Android->set Product name->Export Project->Select path to save it&Uncheck export with debug->Save.


Then install the apk file you have created, and play.

Note that some phone can't install the apk, i dont know why.
Try to build the same project with 2 different machine and try to install both to test.







Komentar

Postingan populer dari blog ini

how to install postgresql and use it with php on termux

first of all you need to install it: apt install postgresql then specify data dir for it by typing: initd -D YOUR_DATA_DIR example YOUR_DATA_DIR is /data/data/com.termux/files/home/mydb note that you don't need to make the dir first, you just need the dir name then initdb will create it automatically :) in this example like this: initdb -D /data/data/com.termux/files/home/mydb The files belonging to this database system will be owned by user "u0_a171". This user must also own the server process. The database cluster will be initialized with locale "C.UTF-8". The default text search configuration will be set to "english". Data page checksums are disabled. creating directory test ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... sysv selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Asia/Jakarta creating configuration files...

Running proot program over termux xorg

  # Running xorg and xvfb on Termux pkg add tur-repo apt update -y && apt upgrade -y pkg install x11-repo # Mempermudah nantinya apt install fish starship pulseaudio tmux -y chsh -s fish exit # Kembali ke termux dan ini hasilnya: # Beri akses ke internal storage termux-setup-storage # Install xorg-server apt install xorg-server xorg-server-xvfb -y # Sampai sini harusnya akan ada error muncul jika mencoba menjalankannya: # Fix error dengan cara install mesa zink apt install mesa-zink/tur-packages # Install xwayland untuk termux-x11 apt install libwayland-protocols libepoxy xwayland # Download termux-x11 .zip dari github lalu extract file zip-nya dan install file termux-x11.apk dan .deb-nya (dengan cara dpkg -i file.deb) # Kenapa install dari github? Karna termux-x11-nightly dari repo termux bermasalah # Setelah semua selesai, tinggal install program yg membutuhkan X server, misalkan xterm (30MB) atau openbox (700MB) apt install xterm -y # Jalankan X11 DISPLAY=:0 termux-x11 #...

What is Declaration, Expression, and Statement

Declaration simply means initialization without value. for example: let x; Expression is the operation being used to some primitive data types and will return a value result, like: Numerical expression (10+30)  String expression ("Hello" + "World!") Boolean expression (a > b) Conditional expression (age > 18 ? "allow":"exit") while Statement is just a fancy word to combine both, like: let x = "Hello" + "World!" // this whole line is called statement