It's taken a week to battle my way to getting a larger project compiled and running on an Android device.
The main help for getting android apk's compiled is still in the minimal help doc in the wiki: http://orx-project.org/wiki/en/orx/tutorials/setup_android
However that's only half the story.
Having a suitable blank android build project is required for people to use to adapt around their own projects.
Creating a new project from within eclipse is *not* suitable due to the orx dependency. It is only useful for compiling the apk file.
The question is... should the orx/code/demo/android project be considered as the minimum template for an android project?
It does give a newbie the best chance for success.
The problem is, it misses a few things for wrapping a more complex game, like a missing STL reference for c++ projects.
So should the demo be seen as the default template for android... or should another project be defined and shipped with orx that contains the STL references, and some more generic naming for the project and manifest?
Would very much like to discuss the way forward.
However, I think any STL reference is more of a user choice.
Personally I don't want to have it referenced even though all my game projects are coded in C++.
But... this could be covered as part of the "upcoming" android documentation.
In my experience, STL use behavior is quite the opposite of what you describe. I've worked for 5 different game companies over a 13 years span, and the only common thing they had, code-wise, was they all proscribed the use of STL (as well as exceptions, RTTI, etc).
Some companies even attempted to correct the default implementations, like the EASTL: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html
Most of them would use custom containers, which API is sometimes loosely based on STL.
That being said, my background is console/PC game development, I don't know if the practices are similar with mobile dev (though native Java/Obj-C environments probably brought different constraints).
But when working through getting my project compiling, it complained about <vector> specifically. After searching around I found the answer was that I was missing the reference:
APP_STL := stlport_static
from my Application.mk.
I suppose that's really what I'm getting at.
it can be used as a template for your games but the simplicity of the demo only depends on orx.
it's up to you to configure your android build for your needs.
If you need help I can help you with this.
Yep, that info definitely would be helpful to have on the wiki, even though it's in the NDK documentation, it's easy to miss.
I should be starting my first android setup next week and I'll be using your updated tutorials as well.
Earlier versions of the android build were sweet, but the most recent is causing me grief. Working with lydesik to hopefully resolve.
You'll get an apk, but the demo will close without error running on a device.
I had success with earlier versions.
* Real 2.3 Device - Passed
* Real 4.04 Device - Failed, Quits immediately.
* VirtualBox Android 2.3 - Failed with error (expected I guess)
* VirtualBox Android 4.3 - Failed with error
* Bluestacks on Windows (based on 2.3) - Passed
Interesting to note that VirtualBox instances can't run orxDemo.apk but Bluestacks can. A real 2.3 can. Nothing else I try will.
Attached is the log from the 4.0.4 device.
Lydesik, I'd appreciate your thoughts on the result and I can supply the actual orxDemo.apk if you like. https://forum.orx-project.org/uploads/legacy/fbfiles/files/motorola_zoom_404_running_demo.txt
If you were to try without sound (by using the dummy sound plugin, for example), you should be able to go further before lydesik gets a chance to look at it.
You could also try to compile openal-soft in debug as it might provide more useful log, or at least tell us in which call precisely things go haywire.
Good luck! :-)
the error in the log is ILL_ILLOPC for illegal opcode which is very weird...
here is a build I just created by recompiling orx with android ndk-r10
I'll test it tomorrow on a Tegra2 device (like the Motorola XOOM).
Can you check this apk on your device. https://forum.orx-project.org/uploads/legacy/fbfiles/files/app_debug.zip
Great to see you back. The app_debug.apk failed as well. I've sent you the log via email.