How to set up Box2D for Android
-
Hello. Have you tried running Box2D on Android? If so, did you build Box2D for Android or did you add the Box2D source to your project? Or did you include the jar assembly, as is available here: https://doc.qt.io/qt-6/android-3rdparty-libs.html What is the best and the simplest way?
All I found are these two sources. But they are complex. Is there a simple step by step guide?
- https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application
- https://www.packtpub.com/product/android-ndk-game-development-cookbook/9781782167785
I ran the first triangle on OpenGL ES 2.0 on emulator and smartphone. I want to make a demo on Box2D.
-
I found the simplest way. I just include the source code of Box2D to my project:
It allows me to have the same code base for Desktop and Android:
-
@8Observer8 said in How to set up Box2D for Android:
Box2D
I guess you can build it as a dynamic or static lib and simply add the lib to your project. Both ways will work.
-
Hi,
You might want to check the qml-box2d project.
-
I see that I can build a shared/static library from Qt Creator for Android:
I think I can add the Box2D source code and build the library. I'll try later. I don't know how to use this vehicle yet. I haven't found a step by step guide yet. First I want to try adding the Box2D source code to a project without libraries.
-
I found the simplest way. I just include the source code of Box2D to my project:
It allows me to have the same code base for Desktop and Android:
-
8 8Observer8 has marked this topic as solved on