This question goes out to the people who are using Windows OS and developing games on android with the SDL2 android framework.
The OS I’m using is Windows 7, 64-bit, and I’m having a lot of problems executing my app on an emulator and on an actual device.
The questions I have is:
- Which version of the Runtime Library (32-bit or 64-bit) on the SDL website should I use?
- Which version of the Android SDK (http://developer.android.com/sdk/index.html , 32-bit or 64-bit) should I use?
- Which version of the Android NDK (https://developer.android.com/tools/sdk/ndk/index.html , platform target) should I use?
As promised in the other thread (https://forums.libsdl.org/viewtopic.php?t=10770):
For “Hatched!” I simply run the game natively on Windows for development, which allows for rapid compilation and very easy debugging. Every now and then I need to get something to the device or emulator, which is what your question seems to be about. I am working with 32-bit builds, so that’s what I picked for everything. Android SDK: simply the latest version will work. Same for NDK… I found that from there, things can get a bit complicated. I made some notes while setting things up:
1. Get SDL2, this includes an Android version
2. Get the Android SDK
3. Get the Android NDK
4. Get WinAnt: https://code.google.com/p/winant
5. Add NDK and SDK to system PATH
6. Get the JAVA development kit (JDK)
7. Create JAVA_HOME system variable and point it to JDK
8. In the project folder, create local.properties, containing:
9. In the project folder, execute "ndk-build"
10. In the project folder, execute "ant debug" or "ant release"
There’s additional trickyness for generating a keystore, and then again when you want to get an app in the store (you’ll need a unique application identifier, which is non-trivial for a Java-evader like me).
Actually, now that Hatched is done, I could try to rip out all the game specific things and set up a ‘minimal Android SDL2 app’ with some guidelines for how to get it from the zip all the way to the store. I suspect that might be useful to newbies like I was 2 months ago. My experience is still fresh, so that might help as well.
Here you go: https://forums.libsdl.org/viewtopic.php?p=45629#45629
Would be awesome if you could give this a whirl and let me know how it went.