尝试使用libgdx上Genymotion运行Android游戏 [英] Trying to run Android game using libgdx on Genymotion

查看:251
本文介绍了尝试使用libgdx上Genymotion运行Android游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都经历了libgdx和genymotion?

Anybody experienced with libgdx and genymotion?

我试图让一个libgdx游戏genymotion Android模拟器运行 - http://www.genymotion.com/

I'm trying to get a libgdx game running on genymotion android emulator - http://www.genymotion.com/

每次我尝试在genymotion运行出现以下异常:

Everytime I try to run on genymotion I get the following exception:

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做工精细

Android的API 16 libgdx 0.9.9 Genymotion 1.1.0

Android API 16 libgdx 0.9.9 Genymotion 1.1.0

推荐答案

您应该尝试在x86本机库添加到您的库中所提到的这个帖子

You should try to add the x86 native libraries to your libs folder as mentioned in this post

要使用的x86当地人,只需从nightlies复制的x86 /文件夹到你的Andr​​oid项目库/文件夹(旁边armeabi和armeabi-V7A文件夹)。在设置 - 用户界面不会自动为你添加这些库。我选择做这种方式暂时为86 Android设备是超级罕见的,你只是炸毁你的APK的大小不必要的。

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.

这篇关于尝试使用libgdx上Genymotion运行Android游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆