1. 程式人生 > >Android Studio Log.v和Log.d不顯示的解決辦法

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) 部分手機可能需要重啟。