Archive 17/01/2023.

Request for video tutorial how to build for androind

codingmonkey

Hi there!

I want to note what video tuts very handy for learning with engine for new comers

So, the man also knowed as Abc Kbc from my commet line for this video

youtube.com/watch?v=yImFcDZ61Lk

he wants to know:

So, if somebody familar with “Android building process” do plz this video for Win and Lunix OS

Sir_Nate

I don’t have time now to make such a video at the moment, and I don’t know of any (I prefer text tutorials), but I can go over it here if that would be helpful.
(From memory, so some parts may be wrong):
Clone the Urho3D repository from Github (or download the zip).
Download the Android SDK and the Android NDK from Google (you can use Android Studio if you want, but I would just get the standalone toolchain).
Install the components needed for your target device (e.g. Android 4.4.2 (API 19 - KitKat) for me because that’s what my phone is.
Install CMake if you haven’t yet and add to the PATH.
Go to the folder where your copy of the repository is located (where you cloned it to, or where you extracted the zip).
run the cmake_android.bat/.sh script, passing it, for example, BuildAndroid as the build directory.

android update project -p . -t <target-id> # target device can be found by calling android list target and finding the appropriate index make -j <num_jobs> # the number of cpu cores you have is generally a decent choice ant debug # or release if this is a release build ant installd #this will install it to your device. ant installr does the same for the release build
Repeat the build process for your own project, pointing it to the libs built for Android

*An important thing to note if you intend to use a screen joystick is that for some phones (perhaps all) the accelerometer becomes joystick 0, so your screen joystick would then have index 1.
*For your actual application you will want to change the package name to something other than the default com.googlecode.urho3d (I think it is actually com.github.urho3d now and that the documentation is old) (and apprently one needn’t change the org.libsdl.app package). Also, less important (because not changing the package name could lead to conflicts with other Urho users if they also don’t change the name) but more noticeable, you will want to change the icon by replacing it in the res folder with your own.
*Depending on your project setup, you may have to copy the Android folder from the Urho3D source to your project, or possibly it’s contents to your project’s folder.