gpt4 book ai didi

android - 尝试在 Genymotion 上使用 libgdx 运行 Android 游戏

转载 作者:塔克拉玛干 更新时间:2023-11-02 18:54:48 24 4
gpt4 key购买 nike

有人使用过 libgdx 和 genymotion 吗?

我正在尝试让 libgdx 游戏在 genymotion android 模拟器上运行 - http://www.genymotion.com/

每次我尝试在 genymotion 上运行时,我都会收到以下异常:

java.lang.ExceptionInInitializerError
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'gdx' for target: Linux, 32-bit
at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:113)
at com.badlogic.gdx.utils.GdxNativesLoader.load(GdxNativesLoader.java:34)
at com.badlogic.gdx.backends.android.AndroidApplication.<clinit>(AndroidApplication.java:61)
... 15 more
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gdx: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:109)
... 17 more

有什么想法吗?

适用于 AVD

安卓 API 16libgdx 0.9.9Genymotion 1.1.0

最佳答案

您应该尝试将 x86 native 库添加到您的 libs 文件夹中,如 this post 中所述

To use the x86 natives, simply copy the x86/ folder from the nightlies to your Android project’s libs/ folder (next to the armeabi and armeabi-v7a folder). The setup-ui will not add those libraries for you automatically. I opted to do it this way for the time being as x86 Android devices are super rare, and you’d just blow up the size of your APK unnecessarily.

关于android - 尝试在 Genymotion 上使用 libgdx 运行 Android 游戏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18549829/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com