Android Studio Log.v和Log.d不显示的解决办法

       今天用华为荣耀7进行安卓测试,发现Log.v和Log.d不显示打印信息,只显示Log.i、Log.w和Log.e的信息。

protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_2_32);

    Log.v("Activity_2_32","This is ---------------------------");
    Log.v("Activity_2_32","This is Verbose");
    Log.d("Activity_2_32","This is Debug");
    Log.i("Activity_2_32","This is Information");
    Log.w("Activity_2_32","This is Warning");
    Log.e("Activity_2_32","This is Error");
}

        网上查询之后,找到了解决办法,亲测有效。

(1) 进入拨号界面输入:*#*#2846579#*#* 

(2) 进入“后台设置” ——>“LOG设置”

(3) 点击选择“AP日志”

(4) 部分手机可能需要重启。

Android Studio Log.v和Log.d不显示的解决办法_第1张图片

你可能感兴趣的:(安卓移动开发)