Android project for Android Studio Guide

Hello guys,

I saw that in the newest release (2.0.8) there is an official android studio project. Is there a Guide or step by step video to set it up? The readme file really doesn’t help and the project just doesn’t build once you open it in Android Studio.

Greetings,

Hello, sorry dont’ know about a guide but maybe it helps if I tell you how I did it.

Copy the sdl root directory into android-project/app/jni and rename it to SDL.
Of course you don’t need all the files but make sure that you have now: android-project/app/jni/SDL/Android.mk (the make file for SDL)
and the SDL source directories android-project/app/jni/SDL/src and android-project/app/jni/SDL/include
Then copy your source file(s) into android-project/app/jni/src and edit the Android.mk file there, to include your source file(s), and it should work.

Hello rxgame,

Thank you for your reply, but what about SDL_image, SDL_net, etc how do I include that in my project?

Greetings,

You can just symlink the SDL library directories under your application’s jni directory. If you’ve copied the template, they’ll get automatically added to your application build.