zoukankan      html  css  js  c++  java
  • Android程序调试方法

    1.使用System.out.println语句

    a 直接在代码中插入:System.out.println("johnny: test");

    b 打开Window--Show View--Other--Android--LogCat

    c Filter : johnny 得到:

    由此可见,在输入println消息的时候要有独特的特征,这样才能够在众多的消息中通过filter找到它。

    注意,filter所过滤的是text栏的内容,对其他栏没有任何的过滤作用。

    2. 使用Log类

    a import android.util.Log;

    b Log.d("TAG", "johnny: test");

    c 打开Window--Show View--Other--Android--LogCat

    d Filter : johnny 得到:

  • 相关阅读:
    poj 3744 题解
    hdu 1850 题解
    New World
    CSP2019游记
    LOJ6052 DIV
    CF809E Surprise me!
    Luogu4548 歌唱王国
    Luogu4581 想法
    Note 5.26-5.28
    LOJ6519 魔力环
  • 原文地址:https://www.cnblogs.com/johnpher/p/2952663.html
Copyright © 2011-2022 走看看