Is it possible to build / use SDL 2 on an Android device?

Hello,

there are a lot of IDE’s available that make it possible to write, compile and run C/C++ Applications and or native Android Apps directly on a Android device (CCTools, AIDE, TerminalIDE, …). I really love the freedom to learn and code wherever I am.

What I’m currently missing is a good and easy to use library that gives access to functionality needed for 2d Games. I was so happy to hear that SDL2 support Android, but I couldn’t figure out how I can get it to work on my Galaxy S3.

Is it possible to use SDL 2 directly on an Android device for coding / compiling Applications? If so, can it only be used with the NDK/SDK or can I use it to write / test Games for the Pc?

Is there some information available how I can compile SDL 2 on an Android Device? Or can someone tell me how I can do it? If this is not possible with SDL 2, is there another library for C/C++ available that can be used to write 2d Games on an Android device?

I’m thankful for any help.

Have a look at this:
http://hg.libsdl.org/SDL/file/83878644c8e6/README-android.txt

JosebaOn Fri, Aug 23, 2013 at 3:52 PM, nilsV <nils_voege at web.de> wrote:

**
Hello,

there are a lot of IDE’s available that make it possible to write, compile
and run C/C++ Applications and or native Android Apps directly on a Android
device (CCTools, AIDE, TerminalIDE, …). I really love the freedom to
learn and code wherever I am.

What I’m currently missing is a good and easy to use library that gives
access to functionality needed for 2d Games. I was so happy to hear that
SDL2 support Android, but I couldn’t figure out how I can get it to work on
my Galaxy S3.

Is it possible to use SDL 2 directly on an Android device for coding /
compiling Applications? If so, can it only be used with the NDK/SDK or can
I use it to write / test Games for the Pc?

Is there some information available how I can compile SDL 2 on an Android
Device? Or can someone tell me how I can do it? If this is not possible
with SDL 2, is there another library for C/C++ available that can be used
to write 2d Games on an Android device?

I’m thankful for any help.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

SDL 2.0 has an Android port.
As long as your Android device has a bash-esque* shell and typical GNU development tools, it should be possible to build SDL2.0 using the current build system.
Otherwise, you might have to put together a project using one of those IDEs you mentioned.

Either way, it should be totally possible.

    • you could always just build such a shell if you don’t already have one------------------------
      Nate Fries

Btw, how can one choose to build SDL2 for Android??? I guess I pass android as a target??? How do I do this???

Sorry for the many questions but my knowledge of GNU auto tools is limited.On Aug 28, 2013, at 4:51 AM, “Nathaniel J Fries” wrote:

SDL 2.0 has an Android port.
As long as your Android device has a bash-esque* shell and typical GNU development tools, it should be possible to build SDL2.0 using the current build system.
Otherwise, you might have to put together a project using one of those IDEs you mentioned.

Either way, it should be totally possible.

    • you could always just build such a shell if you don’t already have one

Nate Fries


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

First you need to download Android NDK and Android SDK. Then you will
neeed to create an Android project where you will put SDL code (inside
the jni folder). Eventually you will be able to compile the code using
the ndk-build script.
The process requires some getting used to, and you would need to read a
lot of docs, but eventually SDL2 will build and work just fine :slight_smile:
I believe there is a tutorial somewhere on the net. Just google it.On 8/28/2013 7:41 AM, neoaggelos at gmail.com wrote:

Btw, how can one choose to build SDL2 for Android??? I guess I pass android as a target??? How do I do this???

Sorry for the many questions but my knowledge of GNU auto tools is limited.

On Aug 28, 2013, at 4:51 AM, “Nathaniel J Fries” wrote:

SDL 2.0 has an Android port.
As long as your Android device has a bash-esque* shell and typical GNU development tools, it should be possible to build SDL2.0 using the current build system.
Otherwise, you might have to put together a project using one of those IDEs you mentioned.

Either way, it should be totally possible.

    • you could always just build such a shell if you don’t already have one

Nate Fries


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
Game Designer/CEO
http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming

Oh, I know how to use it inside the project, as explained in README-android.txt. I just probably misread what Nate wrote, and thought he talked about cross-compiling. thanks, anyway!On Aug 28, 2013, at 10:02 AM, Pallav Nawani wrote:

First you need to download Android NDK and Android SDK. Then you will neeed to create an Android project where you will put SDL code (inside the jni folder). Eventually you will be able to compile the code using the ndk-build script.
The process requires some getting used to, and you would need to read a lot of docs, but eventually SDL2 will build and work just fine :slight_smile:
I believe there is a tutorial somewhere on the net. Just google it.

On 8/28/2013 7:41 AM, @Aggelos_Kolaitis wrote:

Btw, how can one choose to build SDL2 for Android??? I guess I pass android as a target??? How do I do this???

Sorry for the many questions but my knowledge of GNU auto tools is limited.

On Aug 28, 2013, at 4:51 AM, “Nathaniel J Fries” wrote:

SDL 2.0 has an Android port.
As long as your Android device has a bash-esque* shell and typical GNU development tools, it should be possible to build SDL2.0 using the current build system.
Otherwise, you might have to put together a project using one of those IDEs you mentioned.

Either way, it should be totally possible.

    • you could always just build such a shell if you don’t already have one

Nate Fries


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
Game Designer/CEO
http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org