SDL App Framework |
ruler501
|
I wrote a simple framework for developing apps using SDL. Theoretically it could be used for mobile or desktop, but my intent was for mobile devices. My next goal is to write a build script in python to compile it for any target.
Here is the source(If you have a better name for it I'd welcome it). https://github.com/ruler501/AppFramework |
|||||||||||
|
goxl
|
this is cool~~~~~~~~~~~~~~
|
|||||||||||
|
SDL App Framework |
Pallav Nawani
|
check the logcat to see the problem.
On a console, run adb logcat. Then execute program. The logcat will likely contain the reason your program was stopped. Pallav Nawani IronCode Gaming Private Limited Website:Â http://www.ironcode.com Twitter:Â http://twitter.com/Ironcode_Gaming Facebook: http://www.facebook.com/Ironcode.Gaming Mobile: 9997478768 On Sat, Sep 6, 2014 at 8:29 PM, Naith wrote:
|
|||||||||||||
|
Naith
|
Thanks for your answer. I check logcat inside Eclipse and got these error messages: http://tinypic.com/view.php?pic=15ydr9h&s=8#.VAwpXxaC_ng
And second try (after rebuild with ndk-build script): http://tinypic.com/view.php?pic=elsmf&s=8#.VAwtSxaC_ng I have no idea what any of those mean. |
|||||||||||
|
SDL App Framework |
Pallav Nawani
|
Hi,
In the second image you linked to, at 5th line from the bottom, you can see the cause of crash being UnsatisfiedLinkError. What this usually means is that you are trying to load a native library that doesn't exist or you didn't compile in. If you open SDLActivity.Java in eclipse and go to around line 49 (the line number is visible in the error log you showed me), you should see something like: // Load the .so   static {     System.loadLibrary("SDL2");     System.loadLibrary("SDL2_image");     //System.loadLibrary("SDL2_mixer");     //System.loadLibrary("SDL2_net");     //System.loadLibrary("SDL2_ttf");     System.loadLibrary("main");   }  System.loadLibrary("SDL2"); for example, loads the SDL libary dynamically.  Check for the libraries you are not using, but you are trying to load, and comment those lines. In particular, try commenting the lines System.loadLibrary("reloc_library");  and System.loadLibrary("signal"); if they exist. Hope this helps. Pallav Nawani IronCode Gaming Private Limited Website: http://www.ironcode.com Twitter: http://twitter.com/Ironcode_Gaming Facebook: http://www.facebook.com/Ironcode.Gaming Mobile: 9997478768 On Sun, Sep 7, 2014 at 3:33 PM, Naith wrote:
|
|||||||||||||
|
Naith
|
Thanks for the answer.
I edited the SDLActivity.java and commented in SDL_image and such so I can use the external libraries but I still get the following errors: http://tinypic.com/view.php?pic=2lx7ayv&s=8 I really don't get it and it makes me really frustrated. A lot of people are making android apps with SDL (as far as I know) and there must be something that I'm doing wrong. |
|||||||||||
|
SDL App Framework |
Pallav Nawani
|
It is showing the same error as before. Why, I've no idea. This probably a configuration issue, one you will have to debug at your end, I am afraid.
Pallav Nawani IronCode Gaming Private Limited Website:Â http://www.ironcode.com Twitter:Â http://twitter.com/Ironcode_Gaming Facebook: http://www.facebook.com/Ironcode.Gaming Mobile: 9997478768 On Mon, Sep 8, 2014 at 4:54 PM, Naith wrote:
|
|||||||||||||
|
Naith
|
Thanks anyway.
|
|||||||||||
|
ruler501
|
Try running these commands in an empty directory and see if that works
git clone https://github.com/ruler501/AppFramework cd AppFramework/android cp ../src/* jni/src adroid update project --path ./ cd jni/src && ndk-build -j8 NDK_DEBUG=1 ant debug install If that doesn't work it means the error is on my side. |
|||||||||||
|
Naith
|
Should I execute the commands in a commando prompt (I'm using Windows-OS)?
These commands doesn't work. |
|||||||||||||
|
ruler501
|
Yes you do execute them in the command prompt
If you have the build environment setup correctly for android(ant and android on the system path) those commands should execute just fine |
|||||||||||
|
Naith
|
I've indeed added the Android Development Tools- and Android Development Kit to the system path but I'm not sure if that's all I have to do. http://tinypic.com/view.php?pic=11ujfj9&s=8#.VBXqvBaC_ng
Is the "cp"-command a command prompt command or an android specific command? |
|||||||||||
|
ruler501
|
cp is a standard windows command prompt command
|
|||||||||||
|
Naith
|
It turns out that the cp command is a UNIX command but I just copied the files from the first directory to the other.
"adroid update project --path ./ " doesn't work either. Did I do the system path correctly? |
|||||||||||
|
ruler501
|
Hm it works fine for me to use cp
Replace ./ with the path to the Android directory. |
|||||||||||
|
Naith
|
Sorry, still doesn't work. I really doubt it's something wrong with your framework and that the error / problem is with my computer. Thanks for your time.
|
|||||||||||
|