问题描述
我想从这个基础libgdx游戏构建Android游戏但是,当移植到Android游戏在Android应用程序崩溃从 HTTP下载的libgdx codeI:// rengelbert .COM /博客/下载/ froggerLibGDXSource.zip
和我有建立在Android code这个游戏中,你可以从这里 HTTPS下载://rapidshare.com/files/3456268683/FroggerLibGDXAndroid.zip
游戏崩溃和无法启动请帮我在移植游戏到Android
这是我得到的错误信息
/ AndroidRuntime(2966):>>>>>>>>>>>>>> AndroidRuntime START<<<<<<<<<<<<<<
/ AndroidRuntime(2966):CheckJNI为ON
/ AndroidRuntime(2966):---注册本地函数---
/ ActivityManager(65):启动活动:意向{行为= android.intent.action.MAIN猫= [android.intent.category.LAUNCHER
/ AndroidRuntime(2966):关闭虚拟机
/ dalvikvm(2966):调试器分离;对象注册了1项
/ AndroidRuntime(2966):注:连接线的捆扎线#3'失败
/ ActivityManager(65):启动PROC com.libgdx.screen的活动com.libgdx.screen / .LibgdxScreenAndroidActivity:PID = 29
/ dalvikvm(2973):试图加载LIB /data/data/com.libgdx.screen/lib/libgdx.so 0x43e37a00
/ dalvikvm(2973):增加了共享库/data/data/com.libgdx.screen/lib/libgdx.so 0x43e37a00
/ dalvikvm(2973):没有JNI_OnLoad在/data/data/com.libgdx.screen/lib/libgdx.so 0x43e37a00发现,跳绳的init
/ dalvikvm(303):GC_EXPLICIT释放1722对象/在13322ms 57656字节
/ qemud(38):fdhandler_accept_event:接受于FD 10
/ qemud(38):创建客户端0x1073a8监听FD 15
/ qemud(38):client_fd_receive:在尝试注册服务'传感器'
/ qemud(38):client_fd_receive: - >接收到的频道号17
/ qemud(38):client_registration:注册成功的客户端17
/ qemud(38):fdhandler_event:断开的FD 15
/ AndroidInput(2973):传感器监听器设置
/ libEGL(2973):egl.cfg没有找到,使用默认的配置
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ libEGL(2973):加载/system/lib/egl/libGLES_android.so
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ QemuSensors(2973):data__poll:LEN = -1,错误号= 9:错误的文件数
/ ActivityManager(65):启动超时已过期,放弃唤醒锁!
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ AndroidGraphics(2973):OGL渲染:Android的PixelFlinger 1.3
/ ActivityManager(65):显示活动com.libgdx.screen / .LibgdxScreenAndroidActivity:10258毫秒(共10258毫秒)
/ AndroidGraphics(2973):OGL供应商:安卓
/ AndroidGraphics(2973):OGL版本:的OpenGL ES-CM 1.0
/ AndroidGraphics(2973):OGL扩展:GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_ precision GL_OES_read_f
/ AndroidGraphics(2973):帧缓冲:(5,6,5,0)
/ AndroidGraphics(2973):深度缓存:(16)
/ AndroidGraphics(2973):stencilbuffer:(0)
/ AndroidGraphics(2973):样品:(0)
/ AndroidGraphics(2973):覆盖采样:(假)
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ ActivityManager(65):活动空闲超时时间为HistoryRecord {43f692f8 com.libgdx.screen / .LibgdxScreenAndroidActivity}
/ dalvikvm(2973):GC_EXTERNAL_ALLOC释放1740对象/在1622ms 111376字节
/ QemuSensors(2973):data__poll:LEN = -1,错误号= 9:错误的文件数
/ AndroidGraphics(2973):管理网格/应用程序:{}
/ AndroidGraphics(2973):管理纹理/应用程序:{}
/ AndroidGraphics(2973):管理着色器/应用程序:{}
/ AndroidGraphics(2973):托管缓存/应用程序:{}
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
/ QemuSensors(65):data__poll:LEN = -1,错误号= 9:错误的文件数
请试试这个,看看它是否解决了碰撞:
转到属性为Android项目,请确保该JAR和桌面项目已出口。检查Java构建路径 - >订单和出口是这样的:
如果你想使用一个不同的Android版本比4.1这很好(我只是没有安装其他版本的,所以我把它改为4.1)。
i am trying to build android game from this libgdx based gamesbut the android app crashes when ported to android game the libgdx code i downloaded from http://rengelbert.com/blog/downloads/froggerLibGDXSource.zip
and i have build the android code for this game you can download it from here https://rapidshare.com/files/3456268683/FroggerLibGDXAndroid.zip
the game crashes and not startingPlease help me in porting the game to android
this is the error message i got
/AndroidRuntime( 2966): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
/AndroidRuntime( 2966): CheckJNI is ON
/AndroidRuntime( 2966): --- registering native functions ---
/ActivityManager( 65): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER
/AndroidRuntime( 2966): Shutting down VM
/dalvikvm( 2966): Debugger has detached; object registry had 1 entries
/AndroidRuntime( 2966): NOTE: attach of thread 'Binder Thread #3' failed
/ActivityManager( 65): Start proc com.libgdx.screen for activity com.libgdx.screen/.LibgdxScreenAndroidActivity: pid=29
/dalvikvm( 2973): Trying to load lib /data/data/com.libgdx.screen/lib/libgdx.so 0x43e37a00
/dalvikvm( 2973): Added shared lib /data/data/com.libgdx.screen/lib/libgdx.so 0x43e37a00
/dalvikvm( 2973): No JNI_OnLoad found in /data/data/com.libgdx.screen/lib/libgdx.so 0x43e37a00, skipping init
/dalvikvm( 303): GC_EXPLICIT freed 1722 objects / 57656 bytes in 13322ms
/qemud ( 38): fdhandler_accept_event: accepting on fd 10
/qemud ( 38): created client 0x1073a8 listening on fd 15
/qemud ( 38): client_fd_receive: attempting registration for service 'sensors'
/qemud ( 38): client_fd_receive: -> received channel id 17
/qemud ( 38): client_registration: registration succeeded for client 17
/qemud ( 38): fdhandler_event: disconnect on fd 15
/AndroidInput( 2973): sensor listener setup
/libEGL ( 2973): egl.cfg not found, using default config
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/libEGL ( 2973): loaded /system/lib/egl/libGLES_android.so
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/QemuSensors( 2973): data__poll: len=-1, errno=9: Bad file number
/ActivityManager( 65): Launch timeout has expired, giving up wake lock!
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/AndroidGraphics( 2973): OGL renderer: Android PixelFlinger 1.3
/ActivityManager( 65): Displayed activity com.libgdx.screen/.LibgdxScreenAndroidActivity: 10258 ms (total 10258 ms)
/AndroidGraphics( 2973): OGL vendor: Android
/AndroidGraphics( 2973): OGL version: OpenGL ES-CM 1.0
/AndroidGraphics( 2973): OGL extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_f
/AndroidGraphics( 2973): framebuffer: (5, 6, 5, 0)
/AndroidGraphics( 2973): depthbuffer: (16)
/AndroidGraphics( 2973): stencilbuffer: (0)
/AndroidGraphics( 2973): samples: (0)
/AndroidGraphics( 2973): coverage sampling: (false)
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/ActivityManager( 65): Activity idle timeout for HistoryRecord{43f692f8 com.libgdx.screen/.LibgdxScreenAndroidActivity}
/dalvikvm( 2973): GC_EXTERNAL_ALLOC freed 1740 objects / 111376 bytes in 1622ms
/QemuSensors( 2973): data__poll: len=-1, errno=9: Bad file number
/AndroidGraphics( 2973): Managed meshes/app: { }
/AndroidGraphics( 2973): Managed textures/app: { }
/AndroidGraphics( 2973): Managed shaders/app: { }
/AndroidGraphics( 2973): Managed buffers/app: { }
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
/QemuSensors( 65): data__poll: len=-1, errno=9: Bad file number
Please try this and see if it solves the crash:
Go to the properties for the Android Project, make sure that the Jars and the Desktop Project are being exported. Check that Java Build Path -> Order and Export looks like this:
If you want to use a different Android version than 4.1 that's fine (I just don't have other versions installed so I changed it to 4.1).
这篇关于libgdx游戏不工作在Android手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!