The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Android development
Naith


Joined: 03 Jul 2014
Posts: 158
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:

1. Which version of the Runtime Library (32-bit or 64-bit) on the SDL website should I use?
2. Which version of the Android SDK (http://developer.android.com/sdk/index.html , 32-bit or 64-bit) should I use?
3. Which version of the Android NDK (https://developer.android.com/tools/sdk/ndk/index.html , platform target) should I use?
Naith


Joined: 03 Jul 2014
Posts: 158
Extra question: what settings and such do I need to make in Windows?
jbikker


Joined: 01 Oct 2014
Posts: 9
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:

Code:
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:
    sdk.dir=D:\\androidsdk\\sdk
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).
jbikker


Joined: 01 Oct 2014
Posts: 9
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. Smile My experience is still fresh, so that might help as well.
Naith


Joined: 03 Jul 2014
Posts: 158
A big thanks to you! The biggest problem I'm having is doing the correct settings (the one you wrote as notes) and also choosing the correct SDK and NDK. But I think I know now which target and such (of the SDK / NDK) I should pick. Thanks again for your help!

What you wrote in your last message would be very, very much appreciated, and if you want to- and have the time, please do it. Very Happy
jbikker


Joined: 01 Oct 2014
Posts: 9
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.