您的位置:首页 > 移动开发 > Android开发

Android应用程序在某些机型上启动有几率一直黑屏

2014-09-30 15:09 344 查看
====================问题描述====================
我们使用Mono for Android开发了一个App,发现在某些机型上(比如lenovo A3000-H)会打开会出现一直黑屏的情况,进不到程序的界面(同样也定位不到任何调试断点),而有些机型则不会。

通过仔细观察,发现在后台“当前运行程序”一栏,当成功启动时,程序所占体积是21mb左右。当启动失败时(一直黑屏),程序所占体积是9mb左右。

另外通过eclipse监控程序启动日志,对比发现了一些不同。

成功启动时的日志
 WARNING: generic atexit() called from legacy shared library
02-24 16:00:47.263: W/monodroid-gc(2225): GREF GC Threshold: 46800
02-24 16:00:47.521: W/Trace(515):
02-24 16:00:47.531: W/Trace(515):
02-24 16:00:47.618: I/AppCheck(3425): oldcom.lenovo.launcher------------new:com.GDSCP.ModileEnforces
02-24 16:00:47.618: I/AppCheck(3425): runningTask------------action:com.lenovo.safecenter.activityswitch com.GDSCP.ModileEnforces com.lenovo.launcher
02-24 16:00:47.621: W/Trace(3425):
02-24 16:00:47.621: I/LeemCenterReceiver(3425): onReceive()
02-24 16:00:47.622: I/AppCheck(3425): runningTask------------end
02-24 16:00:47.623: I/AppCheck(3425): recentTask------------action:com.lenovo.safecenter.activityswitch2 com.GDSCP.ModileEnforces com.lenovo.launcher
02-24 16:00:47.625: I/AppCheck(3425): recentTask------------end
02-24 16:00:47.626: I/LeemCenterReceiver(3425): newPkg interval == 1393228847625
02-24 16:00:47.626: I/LeemCenterReceiver(3425): cur == 1393228847626 bootTime == 0 time == 1393228847625
02-24 16:00:47.628: W/Trace(3425):
02-24 16:00:47.628: W/Trace(3425):
02-24 16:00:47.628: I/ydp(3425): pkg---->com.GDSCP.ModileEnforces
02-24 16:00:47.628: E/ydp(3425): checkApp pkgName:com.GDSCP.ModileEnforces
02-24 16:00:47.640: I/safepaymen(3425): clearNotify Pkg:com.lenovo.launcher
02-24 16:00:47.647: W/Trace(3425):
02-24 16:00:47.647: W/Trace(3425):
02-24 16:00:47.649: W/Trace(3425):   ////启动失败的顺序排位不同了
//先创建实例,再启动。而启动失败,则是先启动,再创建实例。
02-24 16:00:47.671: E/Launcher(1016): onTriMM<F2><F2><F2><F2><F2><F2><F2><F2><F2><F2><F2><F2><F2>
02-24 16:00:47.671: E/AppsCustomizeTabHost(1016): onTrimMemory reset       000000000000000000000097777766666666111111
02-24 16:00:47.697: W/Parcel(515): Attempt to read object from Parcel 0x57357554 at offset 68 that is not in the object list
02-24 16:00:47.810: I/BufferQueue(133): [com.lenovo.launcher/com.lenovo.launcher2.Launcher](this:0x41f68008,api:1) disconnect: api=1
02-24 16:00:47.810: I/SurfaceTexture(133): [com.lenovo.launcher/com.lenovo.launcher2.Launcher] [virtual android::status_t android::SurfaceTexture::forceAuxConversionLocked()] mCurrentTexture:1, mCurrentBuf:0x41f874f8
02-24 16:00:47.810: I/BufferQueue(133): [com.lenovo.launcher/com.lenovo.launcher2.Launcher](this:0x41f68008,api:0) getReleasedBuffers: returning mask 0xffffffff
02-24 16:00:47.810: I/SurfaceTexture(133): [com.lenovo.launcher/com.lenovo.launcher2.Launcher](this:0x41e38b58,api:0) destroying EGLImage dpy=0x1 img=0x41e38950
02-24 16:00:47.811: I/SurfaceTexture(133): [com.lenovo.launcher/com.lenovo.launcher2.Launcher](this:0x41e38b58,api:0) destroying EGLImage dpy=0x1 img=0x4203c270
02-24 16:00:47.811: I/SurfaceTexture(133): [com.lenovo.launcher/com.lenovo.launcher2.Launcher](this:0x41e38b58,api:0) destroying EGLImage dpy=0x1 img=0x41f877b8
02-24 16:00:47.812: I/SurfaceTexture(133): [com.lenovo.launcher/com.lenovo.launcher2.Launcher](this:0x41e38b58,api:0) destroying EGLImage dpy=0x1 img=0x41f7cab8
02-24 16:00:47.818: I/mono-stdout(2225):
02-24 16:00:47.836: I/mono-stdout(2225):  16:00:47 | info | >>>Initialize the database>>>> 02-24 16:00:47.836: I/mono-stdout(2225):  //启动成功了调用对应的输出
......其后略

启动失败时的日志贴在2L
====================解决方案1====================
别费时间,用c#开发安卓是自己和自己过不去
====================解决方案2====================
我咋看到这么多ERROR。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: