Android#
The 'Android' Target#
Monkey2 uses the android NDK (native development kit) to build android apps.
Setting up for Android development#
-
Install Android Studio and make sure it works, ie: you can build and run one of the simple template projects on a device or emulator.
Android Studio is available here: Android Studio. -
Install the 'NDK' (native development kit) using Android Studio via 'SDK Manager->SDK Tools'.
-
Install the Android 7.0 (Nougat) SDK Platform (API Level 24) using Android Studio via 'SDK Manager'.
-
Edit your monkey2
bin/env_windows.txt
file and change the ndk-bundle 'PATH' setting so it points to the NDK. Or, you can just add the ndk-bundle directory to your system PATH.
Please note: Use the filebin/env_macos.txt
on macOS andbin/env_linux.txt
on Linux. -
Fire up Ted2go and select 'Build -> Update/Rebuild Modules -> Android'.
Alternatively you can (re-)build the android modules on the command-line:
mx2cc makemods -clean -target=android -config=debug
mx2cc makemods -clean -target=android -config=release
Building an Android app#
-
Build your app in Ted2go using 'Build -> Build Only' with 'Build Target -> Android' selected.
-
Open the generated Android Studio project (at myapp.products/Android) in Android Studio.
Attention
I recommend disabling the following Android Studio setting for Monkey2 development:
File -> Settings -> Build, Execution, Deployment -> Instant Run -> Enable Instant Run
With this enabled, Android Studio doesn't seem to notice when external project files change.