这是我的logcat显示的内容:
01-22 16:20:31.232: DEBUG/szipinf(333): Initializing inflate state01-22 16:20:31.563: DEBUG/PhoneWindow(333): Couldn't save which vIEw has focus because the focused vIEw com.JDLApps.Snake.FrameWork.AndroIDFastRenderVIEw@4050f950 has no ID.01-22 16:20:36.362: WARN/ActivityManager(73): Activity pause timeout for HistoryRecord{406532f8 com.JDL.Apps.Snake/.SnakeGame}01-22 16:20:43.682: INFO/ActivityManager(73): Start proc com.androID.launcher for activity com.androID.launcher/com.androID.launcher2.Launcher: pID=358 uID=10026 gIDs={}01-22 16:21:20.393: ERROR/inputdispatcher(73): channel '406762c0 com.JDL.Apps.Snake/com.JDL.Apps.Snake.SnakeGame (server)' ~ Consumer closed input channel or an error occurred. events=0x801-22 16:21:20.402: ERROR/inputdispatcher(73): channel '406762c0 com.JDL.Apps.Snake/com.JDL.Apps.Snake.SnakeGame (server)' ~ Channel is unrecoverably broken and will be disposed!01-22 16:21:21.092: INFO/WindowManager(73): WIN DEATH: Window{406762c0 com.JDL.Apps.Snake/com.JDL.Apps.Snake.SnakeGame paused=false}01-22 16:21:21.142: WARN/ActivityManager(73): Timeout of broadcast broadcastRecord{40728640 androID.intent.action.TIME_TICK} - receiver=androID.app.LoadedApk$Receiverdispatcher$InnerReceiver@406300f8,started 56630ms ago01-22 16:21:21.142: WARN/ActivityManager(73): Receiver during timeout: broadcastFilter{4062f930 ReceiverList{4062f8b8 73 system/1000 local:406300f8}}01-22 16:21:21.172: INFO/ActivityManager(73): Process com.JDL.Apps.Snake (pID 333) has dIEd.01-22 16:21:21.362: INFO/WindowManager(73): WIN DEATH: Window{4072b188 SurfaceVIEw paused=false}01-22 16:21:21.443: INFO/ActivityManager(73): Low Memory: No more background processes.
我遗憾的是没有代码可以分享,因为我不知道程序崩溃了.
编辑:绘图代码:
@OverrIDepublic voID screen(float deltaTime) { Graphics g = app.getGraphics(); g.drawpixmap(Assets.background,0); g.drawpixmap(Assets.facebook,750,20); g.drawText("SNAKE",10,150,color.BLACK,AndroIDGraphics.left,null,0); g.drawText("START",g.getWIDth() / 2,g.getHeight() - 20,120,AndroIDGraphics.CENTER,startRec,0); g.drawText("HIGHscore",20,275,50,highRec,0); g.drawText("MORE APPS",g.getWIDth() - 20,AndroIDGraphics.RIGHT,moreRec,0); if (Settings.soundEnabled) g.drawpixmap(Assets.buttons,new Rect(0,100,100),380,480)); else g.drawpixmap(Assets.buttons,new Rect(100,200,new Rect( 0,480));}
drawText方法:
@OverrIDepublic voID drawText(String text,int x,int y,int color,int size,int position,Rect bounds,int rotation) { if (position == left) paint.setTextAlign(Paint.Align.left); else if (position == CENTER) paint.setTextAlign(Paint.Align.CENTER); else if (position == RIGHT) paint.setTextAlign(Paint.Align.RIGHT); else return; paint.setcolor(color); Typeface typeface = Typeface.createFromAsset(assets,"typewrite.TTF"); paint.setTypeface(typeface); paint.setTextSize(size); if (bounds != null) { Rect rec = new Rect(); paint.getTextBounds(text,text.length(),rec); bounds.bottom = y; bounds.top = y - rec.height(); if (position == CENTER) { bounds.left = x - rec.wIDth() / 2; bounds.right = x + rec.wIDth() / 2; } else if (position == RIGHT) { bounds.left = x - rec.wIDth(); bounds.right = x; } else if (position == left) { bounds.left = x; bounds.right = x + rec.wIDth(); } else return; } canvas.save(); canvas.rotate(rotation,x,y); canvas.drawText(text,y,paint); canvas.restore();}解决方法 你某处有内存泄漏.有关可用于跟踪它的工具,请参阅开发人员文档中的 this blog post.另请参阅 this blog post以获取编程提示,以避免在AndroID应用程序中泄漏内存. 总结
以上是内存溢出为你收集整理的android – 我的logcat中的错误是什么?全部内容,希望文章能够帮你解决android – 我的logcat中的错误是什么?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)