Updating SDL2 version: Android Studio

Updating the version of SDL2 is easy when building for Windows (I just replace SDL2.dll), MacOS (I just replace SDL2.framework) and iOS (I just edit and run ios_build.sh). But I’ve not discovered any similarly easy way of updating SDL2 in my Android Studio build.

I always end up having to copy all my app’s source files, makefiles, assets etc. into the new SDL2-2.xx.xx/android-project tree and pointing Android Studio at that. It’s time-consuming and error-prone. There must surely be a better way of doing it, can anybody advise? :face_with_diagonal_mouth:

Whenever I’ve updated SDL on Android I do the following:

  • rmdir all the symlinks to the old SDL folders
  • mklink new symlinks to the newly downloaded SDL folders
  • copy the files from:
    Android\androidprojects<game name>\app\src\main\java\org\libsdl\app
  • In SDLActivity.java uncomment image, mixer, ttf and net

That’s similar to what I do, except that you’re using symbolic links whilst I actually copy the files. Do you perform those steps manually, or do you have a batch/script file for it?

I do it manually

frjfgrjyfgjrhgfjrhgfj to make up 20 characters