libGDX 中的运行时错误

runTime error in libGDX(libGDX 中的运行时错误)

本文介绍了libGDX 中的运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去,我从事我的项目,一切都很好.但最近,我有这个错误:

in past i worked with my projects and everything was good. but recently, i have this errors:

06-02 04:52:27.954: W/dalvikvm(344): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/badlogic/gdx/backends/android/AndroidApplication;
06-02 04:52:27.954: W/dalvikvm(344): Class init failed in newInstance call (Lcom/Jumper/ProjectAndroidActivity;)
06-02 04:52:27.963: D/AndroidRuntime(344): Shutting down VM
06-02 04:52:27.963: W/dalvikvm(344): threadid=1: thread exiting with uncaught exception (group=0x40015560)
06-02 04:52:27.993: E/AndroidRuntime(344): FATAL EXCEPTION: main
06-02 04:52:27.993: E/AndroidRuntime(344): java.lang.ExceptionInInitializerError
06-02 04:52:27.993: E/AndroidRuntime(344):  at java.lang.Class.newInstanceImpl(Native Method)
06-02 04:52:27.993: E/AndroidRuntime(344):  at java.lang.Class.newInstance(Class.java:1409)
06-02 04:52:27.993: E/AndroidRuntime(344):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
06-02 04:52:27.993: E/AndroidRuntime(344):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
06-02 04:52:27.993: E/AndroidRuntime(344):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
06-02 04:52:27.993: E/AndroidRuntime(344):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
06-02 04:52:27.993: E/AndroidRuntime(344):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
06-02 04:52:27.993: E/AndroidRuntime(344):  at android.os.Handler.dispatchMessage(Handler.java:99)
06-02 04:52:27.993: E/AndroidRuntime(344):  at android.os.Looper.loop(Looper.java:123)
06-02 04:52:27.993: E/AndroidRuntime(344):  at android.app.ActivityThread.main(ActivityThread.java:3683)
06-02 04:52:27.993: E/AndroidRuntime(344):  at java.lang.reflect.Method.invokeNative(Native Method)
06-02 04:52:27.993: E/AndroidRuntime(344):  at java.lang.reflect.Method.invoke(Method.java:507)
06-02 04:52:27.993: E/AndroidRuntime(344):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
06-02 04:52:27.993: E/AndroidRuntime(344):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
06-02 04:52:27.993: E/AndroidRuntime(344):  at dalvik.system.NativeStart.main(Native Method)
06-02 04:52:27.993: E/AndroidRuntime(344): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gdx: findLibrary returned null
06-02 04:52:27.993: E/AndroidRuntime(344):  at java.lang.Runtime.loadLibrary(Runtime.java:429)
06-02 04:52:27.993: E/AndroidRuntime(344):  at java.lang.System.loadLibrary(System.java:554)
06-02 04:52:27.993: E/AndroidRuntime(344):  at com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:116)
06-02 04:52:27.993: E/AndroidRuntime(344):  at com.badlogic.gdx.backends.android.AndroidApplication.<clinit>(AndroidApplication.java:59)
06-02 04:52:27.993: E/AndroidRuntime(344):  ... 15 more

我认为这个错误来自我的库.但我用新的来改变它们.有什么解决办法吗?

i think this errors are from my libs. but i change them with new ones. is there any solution for it?

推荐答案

您在文件夹中复制了错误的 .so 文件.我假设您从 gdx-natives.jar 中提取了它们.而是直接从 release/nightly 复制 armeabi 和 armeabi-v7a 文件夹.确保只使用一个版本的 jar 和 native,不要混合使用多个版本的 jar 和 native.

you copied the wrong .so files in the folders. I assume you extracted them from gdx-natives.jar. Instead directly copy the armeabi and armeabi-v7a folders from the release/nightly. Make sure to use jars and natives only from a single release, do not mix jars and natives from multiple releases.

或者使用 gdx-setup-ui,如此处所述 http://code.google.com/p/libgdx/wiki/ProjectSetupNew

Alternatively use the gdx-setup-ui, as described here http://code.google.com/p/libgdx/wiki/ProjectSetupNew

这篇关于libGDX 中的运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:libGDX 中的运行时错误

基础教程推荐