Could someone help install a working android development environment?


I tried this , off course got new errors about some fastmix.o file containing invalid arguments. Deleted it as I thought , test without. Offcourse got new errors about the missing file and give up.

the compiler (ndk-build) complaints of errors and warnings from line 300
error : expected ’ ; ’ at end of declaration
std::vectorstd::string otherImagePaths { “…”};
i get 20 errors like that complaining of each vector declaration.
as well as many C++11 standard warnings.

Thanks for the help.
you’ve all been so helpful :slight_smile:


Difficult to say what’s wrong by the information you provide. Your SDL source is corrupted, a wrong version of C/C++ is chosen somewhere in the makefiles, etc. No one will just take the code of your project, and make it to work for you. It looks like clear that your Android development environment works well. All is about the project, but you jump too fast to building your project, instead of testing something first that is known to work. You create too much unknown all at once, this is difficult to solve, and no one may be able to help you then. This is the importance of the “Hello World” type things, they don’t do much, but a lot has to work for that simple thing to happen, so a lot is achieved when that simple test runs successfully.


but it works perfectly fine when I run it on my laptop (in devc++) ? it just makes no sense.
so do you think the problem is with my code then , and only my code ?



Not necessarily your code, but the makefiles, etc, for Android which should correspond to your code. Also bad or wrongly configured SDL source code. That it builds for your laptop but does not for Android, this completely makes sense. So try it first with something that is known to compile for Android, not with your project, then see what differs and what you may have to change.


This sounds like the Android compiler is not expecting C++11.
Are you using ndk-build? If so, maybe post your .mk files.
This might help, although it is 3 years old:


Yes , it’s complaining of C++11 extensions .
& yes I’m using ndk-build. (in jni src) :

LOCAL_PATH := $(call my-dir)

LOCAL_CFLAGS := -std=c++11

include $(CLEAR_VARS)



LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include $(LOCAL_PATH)/…/SDL2_image $(LOCAL_PATH)/…/SDL2_mixer $(LOCAL_PATH)/…/SDL2_ttf

LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \ main.cpp
LOCAL_SRC_FILES += $(SDL_PATH)/src/.\ gameWindow.cpp
LOCAL_SRC_FILES += $(SDL_PATH)/src/.\ mainScreen.cpp


LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog


LOCAL_CPP_FEATURES += exceptions
LOCAL_CPPFLAGS += -fexceptions (in jni src)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)


LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \ main.cpp
LOCAL_SRC_FILES += $(SDL_PATH)/src/.\ gameWindow.cpp
LOCAL_SRC_FILES += $(SDL_PATH)/src/.\ mainScreen.cpp


$(call import-module,SDL)LOCAL_PATH := $(call my-dir)

Thanks ! :slight_smile: I don’t know how to thank you all , you’ve been so helpful.


hm… try adding APP_STL := gnustl_static to your

According to this , the default c++ runtime is system which has no STL.


Thanks Eric. I did that , and still it didn’t make a difference.
I also have this warning:
android ndk: warning unsupported source file extensions in jni/src/ for module main

so because my code builds in devc++ it’s probably a android compiler problem, speciffically that it doesn’t expect c++11 (as I got a lot of warnings about it) ?

maybe I can post the code /images online somehere and somebody willing compiles it on their system ?

Thanks :slight_smile:

i get warnings / errors for the jni/smpeg2 hufftable.cpp file ??! It just never ends :frowning:


I don’t want to be a pain, but I’m still very much stuck with this. More then a month now :frowning:
I just want to get my app on my phone , see it , test it etc .

Please, local, or remotely, any help. I’ll pay. I am getting a bit desperate :sweat:

I can post a link to all the mk files at least later tonight. hopefully that might help .

thaks all .


Just following this conversation, I don’t have an answer, but I think there is a lot of missing information for anyone to properly diagnose the exact issue you are running into.

Here are some things that are going to make things easier:

  1. What platform are you building from? Windows? Linux? Mac? Something else?
  2. What toolchain are you using? Gcc? MSVC? Something else?
  3. What version are all your build tools (ndk, android sdk, c++, etc.)
  4. Can you provide either a zip or a source code repository (like github) so we can see all files (even ones you don’t think are relevant)? If this is a closed source project, are you able to reproduce your issue in a test application that you could post as a zip or source code repository? Providing a full project (even if it’s just a minimal reproduction of your app) for other people test will increase everyone’s chances of figuring out what the issue is. This will also means we can verify that the suggestions made in this thread have been applied properly, and makes it easier for anyone on the thread to suggest other fixes.
  5. Can you take a screenshot of your android sdk configuration so we can see exactly what modules and versions you have installed?

I’m not sure if your project issues are spread between different discussion threads, so maybe you’ve already provided some of this information elsewhere, but it would be nice if everything were in one place to let the community know exactly what your setup is.


Thanks Alex, I’ll try posting as much as possible.

First updated source code with header files as well.
The images are all png format.

all mk files:

I’m using :

Windows 7 professional.
mingw compiler, but I don’t know the version as I can’t even find the original download folder?
ndk version 13.
sdk version ?, I can only find something about apache version 2 in a text file within the sdk folder.
but I think I downloaded it from here: /index.html#downloads
just the command line tools for windows.

Up to c++11 standard
SDL2_ttf 2.0.14
SDL2_mixer 2.0.1
SDL2_image 2.0.1
apache ant 1.10.1 bin
I don’t know if it’s relevant but: devc++ 5.11 TDM-GCC
jdk 8u121

Problem is I changed so many setups over the years of differnt IDEs etc and compilers I don’t really know what is what anymore.
I probably should keep better track of these things in the future :slight_smile:
I used lazy foo sdl2 tutorial 52 to set sdl2 on windows android.


getting this finally solved would mean so much to me !! :slight_smile:
everyone will get a case of beer or whatever they like to drink from me :blush:

if something is missing just let me know & I’ll add it as soon as possible :slight_smile:


getting this finally solved would mean so much to me !!

I think you should zip all your project and provide it here, if you want anyone to try to make it to work. Don’t archive the SDL and other libraries source code. You can upload it in GitHub or in some file upload site. Anyone that is, not me, i just don’t see how it’s otherwise possible.

everyone will get a case of beer or whatever they like to drink from me

No no, beer is not enough. One needs to donate to the open source development, for the benefit of humanity :slight_smile: A minimum donation used to be $20 :wink: I’m joking, i have received no donations yet, in spite of doing open source development for more than 10 years.


Thanks for the reply. I’m only not sure what you’re asking?
just my code project in single zip file ?

do you by any chance happen to know any file sharing sites that accept a folder in a single copy/paste ?
otherwise it will be a lot of work to upload every single file one by one :stuck_out_tongue:


Your main options are using Google Drive, or Github. Zip up all your entire project folder. If you’re using any third-party libraries, make sure their source files are also in your folder too.


I’m trying dropbox hopefully it works :slight_smile:


Well it worked with dropbox:


I’m sorry, it doesn’t build for Android, because Android NDK doesn’t support yet all C++11 features.

[Link removed by request of JonnyD]

You also have to add a link to the SDL_mixer and modify the file of the source code if you don’t add certain libraries to your project.


Thanks for the reply . So if I remove any C++11 features my code is fine for the rest?

And ,so how do I add a link to the SDL_mixer and modify the file ?

Because I know absolutely nothing about this at all , this is my first app and first building anything in android attempt :slight_smile:

btw, how do I know if I compiled sdl-mixer, sdl-ttf, and sdl-image ? is this with ndk-build ?
I have no clue about any of this :frowning: just devc++.

thank you so much :slight_smile:


Thanks for the reply . So if I remove any C++11 features my code is fine for the rest?

Yes. What concerns compiling. What concerns what it does, i don’t know, i compiled it and it did run, but didn’t seem to do anything.

And ,so how do I add a link to the SDL_mixer and modify the file ?

I wrote it in Readme. You have to download the SDL_mixer source code too, as you did with SDL, SDL_image, etc. And in its file, there are several settings that look like


You should change it to


If you don’t use certain libraries, because you likely have no modplug library, etc.


Ok , it should do something , it has the buttons for start etc, but they’re setup for a mobile screen?
the app when it first runs should load the flash screen , when the flashscreen is displayed it loads all textures and the startscreen. The startscreen has a few buttons , start is one of them. Then the mainscreen has a goal with several balls & a lettergame selection button (bottom right). when that is clicked it starts the alphabet ‘game’. etc.

but what I don’t understand is some were suggesting ways to get C++11 support for android turned on (in this thread).

And I have the ndk and sdk installed ? I think I adjusted the paths (with lazy foo tutorial 53).
so I just have to add these paths to the enverionment variables I see the ndk path in my paths and a path to apache platform tools ?

I have downloaded and linked all the sdl extensions, and I think they do compile when I run ndk-build ?
so how would I change this . All these extension libraries are in the jni folder, for some reason not in the dropbox folder , because that was very fussy to use , but they are on my laptop.

Thanks :slight_smile:

I do want to give you at least a gift card when I solve this I. And everyone who replied :slight_smile: