[英]java.lang.UnsatisfiedLinkError: Native method not found: com.badlogic.gdx.backends.android.AndroidGL20.glGenTexture:()
I am trying to get a libGDX Android game I have been working on migrated to another laptop. 我试图将我一直在努力的libGDX Android游戏迁移到另一台笔记本电脑上。 I am now using 1.5.3 version of libGDX.
我现在正在使用1.5.3版本的libGDX。 When I try to launch my app from eclipse I get the error shown below:
当我尝试从Eclipse启动我的应用程序时,出现以下错误:
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)
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
The same code works fine on my other laptop. 相同的代码在我的其他笔记本电脑上也可以正常工作。 Any help is appreciated.
任何帮助表示赞赏。
I migrated my project to Android Studio, followed a few instructions, and BANG! 我将项目迁移到Android Studio,并按照一些说明进行操作,然后砰! My app worked with out the runtime error.
我的应用程序消除了运行时错误。 I do not understand why, but I suspect it has something to do with gradle.
我不明白为什么,但是我怀疑这与gradle有关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.