Could someone help install a working android development environment?

Hello,
I hope someone here can help install (remotely or in person) , either Emscripten or Android studio , or both.
With off course SDL & extension libraries support for both.

Eric_wing was kind enough to offer help to run my code in blur(?) , but I would like to try like this first and see if it works.
otherwise I will take him up on his offer :slight_smile:

I should add , I tried installing it all myself (using lazy foo tutorials 52/53 ) , for more then a week and all failed.
Iā€™d rather not try that anymore.
So if anyone could help that would be great.
Off course I will pay for any time/expenses .

Thanks.

Unless you are going to use Gradle, do it in the command line that is, you need NDK and SDK. Download them, and put them in some directories. For SDK you may have to install Android Studio, and SDK as a part of it. Replicant OS, LineageOS and Android-x86 have their own SDK-s. Then add the NDK and the tools directory of SDK, to the path. In Linux add to the ~/.profile for them export PATH=$PATH:your_path , then restart the computer. Then all the building is done using ant , the tool that is a part of SDK

------------------------
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl

You have to install ant separately in Linux i think, i forgot how it got installed, maybe Android Studio installed it.

Thanks actsl , but I tried this for more then a week and it was hopeless. I think it must be really easy to mess up unless youā€™re some expert. This is all new to me. Iā€™m new to sdl as well etc.

thanks anyway.
hope someone can help :slight_smile:

  1. Make sure that sdk and ndk are installed in some directories in your computer

  2. Edit ~/.profile and add the following there, i add it in checking the bash version, but you can add it just to the end

    export PATH=$PATH:your_path_to_sdk/tools
    export PATH=$PATH:your_path_to_ndk

  3. Restart computer

  4. Install ant

  5. Download the SDL, SDL_Image and SDL_ttf source code, put them somewhere, but donā€™t compile, it will not work when you do

  6. Make your project with a proper directory structure and makefiles, and add the SDL, SDL_Image and SDL_ttf directories to the jni directory in your project, and rename them properly, to the names they are referred to

  7. Run the simulator when you want the apk file to be immediately installed into your simulator

  8. Run this in command line in your projectā€™s directory

ant debug install

And this is all you need to do.

------------------------
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl

Add the links to the SDL, SDL_Image and SDL_ttf directories* too bad i cannot edit the posts here

I know those are the steps I tried , It did not work. I tried more then once as well.
This is not simple for me , Iā€™m new to this.

would you be willing to do this remotely on my laptop ?
I would pay you off course.
:slight_smile:

It must work, there is not more to it, do it all from the beginning, nice and clean. You may try the example of my widget toolkit, as this is a ready made project, the other projects you make similarly

https://github.com/actsl/kiss_sdl/files/994018/android_kiss_sdl_example.zip

The biggest caveat i think is that you must not compile the SDL, SDL_Image and SDL_ttf source code. Better remove them and download them again fresh, to be sure that they are not compiled. Why is that, they will be compiled when you build your project, for your android device, so they must not be compiled before that.

------------------------
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl

Try to do that above, and when something goes wrong, write it here, like copy here the end of the ant output, with the error of why it failed. Remember before building, add links to your SDL. SDL_image and SDL_ttf source code directories, to the jni directory of the project. Like with Dolphin, drag and drop them to the jni directory of the project, from the popup menu that opens, select to add link, then rename them to SDL. SDL_image, and SDL_ttf, exactly that. Then, when you have NDK and SDK, and their paths are added to ~/.profile as written above (less ~./profile), then open the terminal in your projectā€™s directory, and run ant debug install. Thatā€™s it.

I donā€™t think you understand. Iā€™m not trying this again myself , itā€™s a waste of time. I spend more then a week and more then one attempt at this , with lazy foo tutorials instructions.
I simply canā€™t do this again without feeling super stressed about it :frowning:

i understand. Take your time. Learn to do simple things necessary for that, like adding path. One at a time. Have you run Android emulator? Do it, it looks really nice. Can you imagine i have no smartphone or tablet, never had, because i donā€™t need it, all i have is the Android emulator. Also Android-x86 that runs in the virtualbox.

------------------------
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl

Please you are not helping. Iā€™m trying to get help here . I will not attempt this myself anymore , end of.

I will pay anyone willing to do this for me remotely :slight_smile:

I have no experience with Android development.
I heard itā€™s kinda complicated to get to work, so I can imagine itā€™s
especially frustrating for beginnersā€¦

Anyway, you could try to make your game just depend on SDL, not
SDL_image, SDL_ttf etc - that should make things less error-prone.
To load PNGs (or some other common formats like jpg, tga, bmp), you
could use my SDL_stbimage.h, which is very similar to SDL_image, but is
no extra lib (.so/.dll) - itā€™s just two additional header files:


(also needs stb_image.h from https://github.com/nothings/stb ; see
comment at the beginning of SDL_stbimage.h for some information and a
short usage example)

Cheers,
Daniel

I donā€™t think anyone is willing to do that, who wants to go into others computers. But you may try to find someone.

Thanks for the replies. I do have it all installed , from before still, but itā€™s not working right.

I get a ton of errors/warnings for my code even though it works perfectly fine on my laptop (with devc++ and mingw).

hereā€™s my code:
https://codeshare.io/amOjAw

so i donā€™t know if itā€™s my code or the installation. I know when I tried this before it didnā€™t load at all the app in my phone .maybe I had the wrong image formats then , now itā€™s all png .

Any suggestions ?

Cannot see your code, it shows just an empty page. When the source code of SDL is compiled, then ant gives a lot of errors. The other reason may be, that your Android project is not made exactly right. This is why i said, try to build my widget toolkit example instead first, as it is ready made. Then you see whether the development environment works, and then you can make your own.

so Iā€™m trying to see if itsā€™ my code or the installation.
well I tried copying the entire contents of the kiss test project , & I got some error:

no rule to make target ā€™ jni/src/ā€¦/sdl/src/main/android/sdl_android_main.c
needed by ā€˜obj/local/arm64-v8a/ojbs/main/ā€¦/sdl/src/main/android/sdl_android_main.oā€™\ stop

any suggestions? :slight_smile:

If this now was the output by ant, then it looks like that the Android development environment works. One possible cause is that the SDL source code was compiled, though i cannot say that this is the only possible cause.

so what do I do now ,because I have no clue ?
what I did btw, was move the entire contents into the android projects folder , no more.
thanks for the reply btw :slight_smile:

I think i could reproduce your error

-pre-build:
[exec] make: *** No rule to make target ā€˜jni/src/ā€¦/SDL/src/main/android/SDL_android_main.cā€™, needed by ā€˜obj/local/arm64-v8a/objs/main/__/SDL/src/main/android/SDL_android_main.oā€™. Stop.

Right? There was such error when i didnā€™t add links to SDL, SDL_image and SDL_ttf source code directories to the projectā€™s jni directory * at all *. Of course then it cannot work, it needs the source code of these libraries, then it compiles them, and then builds the project with these compiled libraries. How else can it get these libraries for ARM, it has to compile them.

The exact cause of the error cannot be found without further information, but the reason should be that the SDL source code directories were either not accessible or they were corrupted.

So what you should do

  1. Download SDL2, SDL_image and SDL_ttf source code packages, extract them somewhere,

  2. In Dolphin or other file manager that you use, drag and drop these directories into the jni directory of the project, from the menu that then appears, choose ā€œLink Hereā€,

  3. Rename these links to SDL, SDL_image and SDL_ttf, exactly these names,

  4. Delete lib and obj directories in the project, if they are there,

  5. Run ā€œant cleanā€ and then ā€œant debug installā€ in the projectā€™s directory.

That should do it.