Skip to content

Android

JimmySnails edited this page Apr 16, 2020 · 9 revisions

Android Build Instructions

Installing Android Studio

After installing, open up SDK manager and install the following:

Preparing the Android Project

Download the SDL source code (2.0.12) Extract it.

Copy the folder android_project to a seperate location. like D:\android\android_project.

Either create a Symlink from your SDL_Source code dir to app\jni\SDL or create the Folder SDL in app\jni\SDL and copy the content of the source code into it. (we can omit several folders...)

Source Code

Again, create a symlink or create a folder for the source code in app\jni\src\Cytopia and copy the source code here

Open app\jni\src\Android.mk and add your source files here: LOCAL_SRC_FILES := YourSourceHere.c

Assets

Create a folder assets in *app\src\main*

This folder is for all the assets that'll be used by the game. Copy the content of data/resources to *app\src\main\assets\resources*

Loading the Project

In Android Studio, click on "import project (gradle, eclipse, ...)" and choose your project (e.g. D:\android\android_project)

Click on build