0

I'm trying to get SDL2(2.0.14) running in Android Studio (2022.1.1.21). When I try to make it run I get this error:

[CXX1405] error when building with ndkBuild using /home/javier/Android/SDL-release-2.0.14/android-project/app/jni/Android.mk: C++ build system [configure] failed while executing:
    /home/javier/Android/sdk/ndk/23.1.7779620/ndk-build \
      NDK_PROJECT_PATH=null \
      APP_BUILD_SCRIPT=/home/javier/Android/SDL-release-2.0.14/android-project/app/jni/Android.mk \
      NDK_APPLICATION_MK=/home/javier/Android/SDL-release-2.0.14/android-project/app/jni/Application.mk \
      APP_ABI=arm64-v8a \
      NDK_ALL_ABIS=arm64-v8a \
      NDK_DEBUG=1 \
      NDK_OUT=/home/javier/Android/SDL-release-2.0.14/android-project/app/build/intermediates/cxx/Debug/5pw5f06e/obj \
      NDK_LIBS_OUT=/home/javier/Android/SDL-release-2.0.14/android-project/app/build/intermediates/cxx/Debug/5pw5f06e/lib \
      APP_PLATFORM=android-16 \
      APP_SHORT_COMMANDS=false \
      LOCAL_SHORT_COMMANDS=false \
      -B \
      -n
  from /home/javier/Android/SDL-release-2.0.14/android-project/app
/home/javier/Android/sdk/ndk/23.1.7779620/build/core/build-binary.mk:643: Android NDK: Module main depends on undefined modules: SDL2    
/home/javier/Android/sdk/ndk/23.1.7779620/build/core/build-binary.mk:656: *** Android NDK: Note that old versions of ndk-build silently ignored this error case. If your project worked on those versions, the missing libraries were not needed and you can remove those dependencies from the module to fix your build. Alternatively, set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies.    .  Stop.

How can I fix this error?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Javier Ramírez
  • 1,001
  • 2
  • 12
  • 23
  • Have you followed the [tutorial included with the release you have used](https://github.com/libsdl-org/SDL/blob/release-2.0.14/docs/README-android.md)? You seem to be using release ``2.0.14``, which will soon be two years old. Try using the [latest version](https://github.com/libsdl-org/SDL/releases/latest) and [follow the latest tutorial](https://github.com/libsdl-org/SDL/blob/SDL2/docs/README-android.md). Then, if you are still having issues, edit your question and include relevant files from the android project. – RedStoneMatt Jul 05 '23 at 09:26

0 Answers0