Android NDK: Module main depends on undefined modules: SDL2

Hey, all! I have been reading LazyFoo’s website and have come to a halt trying to figure out one thing. On this page, all of the instructions have worked so far up to this point:

  1. With our Android environment set up, it’s time to get started. Go to the Android project directory inside of the SDL2 source folder (~/mac_android/SDL2-2.0.3/android-project), open up a terminal and ndk-build. You should get the following error:
    > Android NDK: WARNING: APP_PLATFORM android-12 is larger than android:minSdkVersion 10 in ./AndroidManifest.xml *** No rule to make targetjni/src/…/SDL/src/main/android/SDL_android_main.c’, needed by obj/local/armeabi/objs/main/__/SDL/src/main/android/SDL_android_main.o'. Stop.

The error I’m getting, though, is this:

Android NDK: Module main depends on undefined modules: SDL2
Android NDK: Aborting (set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies)    .  Stop.

I was sure to carefully follow all of the instructions. I can’t find anything on Google, either, so it’s as if I’m the only person who has had this problem. Is there anything obvious that I am forgetting? Thanks, everyone!

Getting the same problem on Ubuntu as well following the Ubuntu version of his tutorial. Could it be something in the Android SDL project files that has changed since the version he used in his tutorial?

Update #2:
Nope, retried it with the version he was using and still no change.


under …/app/src/main/jni directory :
1- modify your SDL2.X.Y package name to SDL2 ( not SDL ).
2- you should find under …/app/src/main/jni/SDL2 :

note : do not use link ( as Android Studio will detect duplicate package )