我在github上分享了这个游戏(it.alcacoop.backgammon)。
我下载并将其导入android studio 1.5.1并在编译期间出现错误,我通过以下更改解决了这个问题。
compile 'com.google.android.gms:play-services-base:7.5+'
compile 'com.google.android.gms:play-services-games:7.5+'
compile 'com.google.android.gms:play-services-appstate:7.5+'
compile 'com.google.android.gms:play-services-plus:7.5+'
compile 'com.google.android.gms:play-services-ads:7.5+'
到
compile 'com.google.android.gms:play-services-base:7.5.0'
compile 'com.google.android.gms:play-services-games:7.5.0'
compile 'com.google.android.gms:play-services-appstate:7.5.0'
compile 'com.google.android.gms:play-services-plus:7.5.0'
compile 'com.google.android.gms:play-services-ads:7.5.0'
在根文件夹中的buld.gradle中 (改为加零)
现在我可以编译游戏并运行它,但在运行时对徽标强制关闭此错误
02-28 06:15:09.205 2271-2287/it.alcacoop.backgammon E/EGL_genymotion: [getAttribValue] Bad attribute idx
02-28 06:15:09.205 2271-2287/it.alcacoop.backgammon E/EGL_genymotion: tid 2287: eglGetConfigAttrib(573): error 0x3004 (EGL_BAD_ATTRIBUTE)
02-28 06:15:09.205 2271-2287/it.alcacoop.backgammon E/EGL_genymotion: [getAttribValue] Bad attribute idx
02-28 06:15:09.205 2271-2287/it.alcacoop.backgammon E/EGL_genymotion: tid 2287: eglGetConfigAttrib(573): error 0x3004 (EGL_BAD_ATTRIBUTE)
02-28 06:15:11.089 2271-2287/it.alcacoop.backgammon E/AndroidRuntime: FATAL EXCEPTION: GLThread 186
java.lang.UnsatisfiedLinkError: Couldn't load gnubg from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/it.alcacoop.backgammon-1.apk"],nativeLibraryDirectories=[/data/app-lib/it.alcacoop.backgammon-1, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:355)
at java.lang.System.loadLibrary(System.java:
at it.alcacoop.backgammon.MainActivity.initEngine(MainActivity.java:508)
at it.alcacoop.backgammon.layers.SplashScreen$2.run(SplashScreen.java:116)
at com.badlogic.gdx.scenes.scene2d.actions.RunnableAction.run(RunnableAction.java:42)
at com.badlogic.gdx.scenes.scene2d.actions.RunnableAction.act(RunnableAction.java:32)
at it.alcacoop.backgammon.actions.MySequenceAction.act(MySequenceAction.java:27)
at com.badlogic.gdx.scenes.scene2d.Actor.act(Actor.java:95)
at com.badlogic.gdx.scenes.scene2d.Group.act(Group.java:50)
at com.badlogic.gdx.scenes.scene2d.Stage.act(Stage.java:223)
at it.alcacoop.backgammon.layers.SplashScreen.render(SplashScreen.java:88)
at com.badlogic.gdx.Game.render(Game.java:46)
at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:422)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1523)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
02-28 06:15:15.913 2271-2271/it.alcacoop.backgammon E/AndroidGraphics: waiting for pause synchronization took too long; assuming deadlock and killing
那说库gnubg没找到但是它在Desktop文件夹的lib文件夹中 谢谢你的关注。