java.lang.UnsatisfiedLinkError中:本机方法未找到:com.badlogic.gdx.backends.android.AndroidGL20.glGenTexture :() [英] java.lang.UnsatisfiedLinkError: Native method not found: com.badlogic.gdx.backends.android.AndroidGL20.glGenTexture:()
问题描述
我想获得一个libGDX的Android游戏我一直在迁移到另一台笔记本电脑。我现在使用1.5.3版本libGDX的。当我尝试从Eclipse启动我的应用我得到如下所示的错误:
I am trying to get a libGDX Android game I have been working on migrated to another laptop. I am now using 1.5.3 version of libGDX. When I try to launch my app from eclipse I get the error shown below:
02-11 21:21:35.519: E/Trace(7276): error opening trace file: No such file or directory (2)
02-11 21:21:36.019: E/dalvikvm(7276): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
02-11 21:21:36.019: E/dalvikvm(7276): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
02-11 21:21:36.820: E/AndroidRuntime(7276): FATAL EXCEPTION: GLThread 11304
02-11 21:21:36.820: E/AndroidRuntime(7276): java.lang.UnsatisfiedLinkError: Native method not found: com.badlogic.gdx.backends.android.AndroidGL20.glGenTexture:()I
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.badlogic.gdx.backends.android.AndroidGL20.glGenTexture(Native Method)
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.badlogic.gdx.graphics.GLTexture.createGLHandle(GLTexture.java:197)
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:123)
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:103)
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:95)
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.mypkg.mygame.screens.MainMenu.show(MainMenu.java:41)
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.badlogic.gdx.Game.setScreen(Game.java:61)
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.mypkg.mygame.mygame.create(mygame.java:20)
02-11 21:21:36.820: E/AndroidRuntime(7276): at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:241)
02-11 21:21:36.820: E/AndroidRuntime(7276): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1505)
02-11 21:21:36.820: E/AndroidRuntime(7276): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
这是code是产生这个错误的位。
This is the bit of code that is generating this error.
public void show () {
FileHandle gdxfile = Gdx.files.internal("data/title.png");
Texture t = new Texture(gdxfile); // this is line where my app crashes
同样的code正常工作在我的其他的笔记本电脑。
任何帮助是AP preciated。
The same code works fine on my other laptop. Any help is appreciated.
推荐答案
我迁移我的项目到Android工作室,随后几个指令,并BANG!我的应用程序了运行时错误的工作。我不明白为什么,但我怀疑它是与gradle这个。
I migrated my project to Android Studio, followed a few instructions, and BANG! My app worked with out the runtime error. I do not understand why, but I suspect it has something to do with gradle.
这篇关于java.lang.UnsatisfiedLinkError中:本机方法未找到:com.badlogic.gdx.backends.android.AndroidGL20.glGenTexture :()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!