Skip to content

Building for android on windows

Zameel Pichen edited this page Jan 23, 2018 · 9 revisions

Update Jan.20.2018

Simply download this entire repo into the root of the partition you are working on.

Then as said in the main readme, load the android-studio folder into your android studio.

If want to build for arm, you will have un-comment x86_64, armv7 in the gradle file inside the ndk block.

It is important that you download it into the root as its configured that way, but it don't have to be necessarily your main partition.

Note : since many of the relating folders like curl,etc inside the 3rdparty folder are linked to other github repos, the working way i found out to download all at once is to clone this repo through the Github Desktop Client .

Archived Guide

Ensure you have cygwin installed with "cpio" module

Ensure you have CMake 2.8.11+ installed (use the windows binary!)

Download and install the android SDK and platform tools Download and extract the android NDK (r8e is the latest supported version http://dl.google.com/android/ndk/android-ndk-r8e-windows-x86_64.zip )

For luajit you will also need mingw installed (the windows version not the cygwin one!) http://tdm-gcc.tdragon.net/download get the TDM64 edition (don't worry it has 32bit support built in too!) and add it to your path

you can edit the bin/build-android.sh file to disable the modules you don't want

Then From cygwin:

export ANDROID_NDK=c:/Users/David/AppData/Local/moaicli/deps/android-ndk/android-ndk-r8e

note that the path to your ndk has forward slashes but not the normal /cygdrive/c stuff at the front!

then from moai-dev folder

./bin/build-android.sh --windows

NB A contributor has a tool called moaicli http://halfnelson.github.io/moaicli/ which can do all this for you (including checking out this sdk)