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
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 .
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
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.
Download the SDL, SDL_Image and SDL_ttf source code, put them somewhere, but donāt compile, it will not work when you do
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
Run the simulator when you want the apk file to be immediately installed into your simulator
Run this in command line in your projectās directory
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
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.
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
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.
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)
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 .
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
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
-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
Download SDL2, SDL_image and SDL_ttf source code packages, extract them somewhere,
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ā,
Rename these links to SDL, SDL_image and SDL_ttf, exactly these names,
Delete lib and obj directories in the project, if they are there,
Run āant cleanā and then āant debug installā in the projectās directory.