Sample application for Android using SDL2 with NDK and Gradle 4
Switch branches/tags
Nothing to show
Clone or download
Latest commit f28f3da Jun 13, 2018

SDL2 Android Example

Read article at blog:

Source code:

  • the code is assembled of several pieces available on GitHub



The project contains Gradle 4.4 wrapper. Gradle 4.7 is not compatible with model from Android Experimental Plugin.

Android build Tools are set to 27.0.3 in file settings.gradle. Make sure to download those tools via Android Studio.

NDK in version 16 (not NDK v17) - more information:



List of build commands for each library. Building libraries one-by-one might help you to identify potential problems during compilation.


gradle distributeLib
gradle installDebug

If you want to build library one by one, then you can specify name of library as module name for Gradle

gradle :SDL2:distributeLib
gradle :SDL2_gfx:distributeLib
gradle :SDL2_png:distributeLib
gradle :SDL2_jpeg:distributeLib
gradle :SDL2_image:distributeLib
gradle :SDL2_mixer:distributeLib
gradle installDebug