What we need to do is tell Gradle (the build tool used by Android Studio) to use the Android make file for our project. SDL2 as a shared object that will interface with Java, and we'll build our game as another shared object that will interface with SDL 2. The Native Development Kit that allows Java to interface with native C/C++ code using the Java Native Interface. Androidĭevelopment is mostly Java based and SDL is a C based library. Let's back up a bit and talk about how SDL 2 on Android works.
This is complaining that the NDK setup is broken for our project. > Error: Your project contains C++ files but it is not using a supported native build system.Ĭonsider using CMake or ndk-build integration with the stable Android Gradle plugin: 14) If you try to hit Build -> Make Project you'll get the following error:Įrror:Execution failed for task ':app:compileDebugNdk'. Build again and you should get a new error.