我有一个应用程序,我试图在其中放置广告,并让它在模拟器中运行,我注意到这不会提供太多信息,只有这个:
01-19 14:35:26.288 404-404/simplemorsecodetranslator.aplicacion.safrapp.simplemorsecodetranslator.segundaparte D/dalvikvm﹕ GC_FOR_ALLOC freed 138K, 5% free 5592K/5831K, paused 39ms
01-19 14:35:26.318 404-404/simplemorsecodetranslator.aplicacion.safrapp.simplemorsecodetranslator.segundaparte I/dalvikvm-heap﹕ Grow heap (frag case) to 10.676MB for 5373424-byte allocation
01-19 14:35:26.398 404-406/simplemorsecodetranslator.aplicacion.safrapp.simplemorsecodetranslator.segundaparte D/dalvikvm﹕ GC_FOR_ALLOC freed 1K, 3% free 10838K/11079K, paused 27ms
01-19 14:35:26.458 404-407/simplemorsecodetranslator.aplicacion.safrapp.simplemorsecodetranslator.segundaparte D/dalvikvm﹕ GC_CONCURRENT freed <1K, 3% free 10847K/11079K, paused 2ms+3ms
01-19 14:35:46.268 404-404/simplemorsecodetranslator.aplicacion.safrapp.simplemorsecodetranslator.segundaparte I/dalvikvm﹕ Could not find method android.widget.LinearLayout$LayoutParams.<init>, referenced from method android.support.v7.internal.view.menu.ActionMenuView$LayoutParams.<init>
01-19 14:35:46.268 404-404/simplemorsecodetranslator.aplicacion.safrapp.simplemorsecodetranslator.segundaparte W/dalvikvm﹕ VFY: unable to resolve direct method 9584: Landroid/widget/LinearLayout$LayoutParams;.<init> (Landroid/widget/LinearLayout$LayoutParams;)V
01-19 14:35:46.268 404-404/simplemorsecodetranslator.aplicacion.safrapp.simplemorsecodetranslator.segundaparte D/dalvikvm﹕ VFY: replacing opcode 0x70 at 0x0000
为什么不提供完整的信息,即使我按下按钮或什么?,我需要提供哪些信息? 顺便说一句,我的设备处于横向模式,即使它是一部手机......
答案 0 :(得分:0)
按下按钮时不会获得任何输出,除非您明确地将其写入日志。对于写日志,您在Log类中有不同的日志记录方法:
在你的按钮情况下你可以写:
Log.i(getClass.getName(), "button pressed");
在适当的位置。
您可以查看Android文档中的Reading and Writing Logs部分以获取更多信息和示例。