Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 897 Bytes

File metadata and controls

24 lines (22 loc) · 897 Bytes

SDL2-Android-Example

SDL2 Example for Android, C/C++ template build tree.

Requires Android NDK and android SDK Tools. Setup PATH to your SDK and NDK in "local.properties" file, sample:

sdk.dir=/home/user/ANDROID/ASDK
ndk.dir=/home/user/ANDROID/NDK	

Prepare SDL2 projects libraries or download ready - see link:
https://github.com/AlexanderAgd/SDL2-Android
and copy "lib" with your SDL2 compiled libraries to folder "app/cpp/lib".
Fix path to SDL2 and SDL2_image headers in the "app/cpp/Android.mk" file, option "LOCAL_C_INCLUDES"
Connect your Android device with "Developer mode" ON and run command:

./gradlew build

to build apk file. Check apk file in "app/build/output/apk/" directory. Or run:

./gradlew installDebug

to build APK and install it on your Android device.