如何让我的应用程序与 AndEngine Phyiscs Box2D 扩展一起使用?

发布于 2024-11-30 19:49:57 字数 1837 浏览 1 评论 0原文

我从 AndEngine 应用程序开始,我想使用Physics Box2D 扩展。我已将 andenginephysicalsbox2dextension.jar 放入 /lib 中,并将其添加到 Eclipse 中的构建路径中。我还将 andenginephysicalsbox2dextension.so 放入 /libs/armeabi 中。 (我还没有对它做任何事情,它是否还需要添加到项目的某个地方?)。当我尝试编译我的应用程序时,我得到一个带有以下堆栈跟踪的 FC:

FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: newWorld
    at com.badlogic.gdx.physics.box2d.World.newWorld(Native Method)
    at com.badlogic.gdx.physics.box2d.World.<init>(World.java:101)
    at org.anddev.andengine.extension.physics.box2d.PhysicsWorld.<init>(PhysicsWorld.java:61)
    at org.anddev.andengine.extension.physics.box2d.PhysicsWorld.<init>(PhysicsWorld.java:57)
    at com.tommedley.helloandengine.HelloAndEngine.onLoadScene(HelloAndEngine.java:96)
    at org.anddev.andengine.ui.activity.BaseGameActivity.doResume(BaseGameActivity.java:169)
    at org.anddev.andengine.ui.activity.BaseGameActivity.onWindowFocusChanged(BaseGameActivity.java:85)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2047)
    at android.view.View.dispatchWindowFocusChanged(View.java:3940)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:659)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1974)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3835)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
    at dalvik.system.NativeStart.main(Native Method)

我做错了什么?

I'm starting out with an AndEngine app, and I want to use the Physics Box2D extension. I've put andenginephysicsbox2dextension.jar in /lib and added it to the Build Path in Eclipse. I've also put andenginephysicsbox2dextension.so in /libs/armeabi. (I haven't done anything with it, does it also need to be added to the project somewhere?). When I try and compile my app, I get a FC with the following stack trace:

FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: newWorld
    at com.badlogic.gdx.physics.box2d.World.newWorld(Native Method)
    at com.badlogic.gdx.physics.box2d.World.<init>(World.java:101)
    at org.anddev.andengine.extension.physics.box2d.PhysicsWorld.<init>(PhysicsWorld.java:61)
    at org.anddev.andengine.extension.physics.box2d.PhysicsWorld.<init>(PhysicsWorld.java:57)
    at com.tommedley.helloandengine.HelloAndEngine.onLoadScene(HelloAndEngine.java:96)
    at org.anddev.andengine.ui.activity.BaseGameActivity.doResume(BaseGameActivity.java:169)
    at org.anddev.andengine.ui.activity.BaseGameActivity.onWindowFocusChanged(BaseGameActivity.java:85)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2047)
    at android.view.View.dispatchWindowFocusChanged(View.java:3940)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:659)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1974)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3835)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
    at dalvik.system.NativeStart.main(Native Method)

What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请帮我爱他 2024-12-07 19:49:57

我不知道问题是什么,但重新下载所有内容,并添加 libxmp.so 解决了问题。

I don't know what the problem was, but re-downloading everything, and also adding libxmp.so fixed the problem.

何必那么矫情 2024-12-07 19:49:57
andenginephysicsbox2dextension.so

该文件在 AndEngine 示例项目中称为 libandenginephysicalsbox2dextension.so
尝试重命名它。

andenginephysicsbox2dextension.so

That file is called libandenginephysicsbox2dextension.so in the AndEngine examples project.
Try renaming it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文