logcat的未顯示經由Log.v/.d
我的輸出信息和未處理的運行時異常(如空指針)後的任何蹤跡並沒有進一步的信息時,應用程序崩潰。有時會顯示Log.i/.w/.wtf/.e
消息。還顯示了來自Android類的selfgenerated
消息(僅有時!)和Android系統輸出(通常始終以logcat顯示)。logcat的沒有顯示在Android Studio中調試消息
logcat的過濾器設置「詳細」和「無過濾器」或「只顯示選定的應用程序」(既沒有解決我的問題)。搜索框中沒有輸入任何內容。重新啓動並沒有解決問題。
我嘗試了不同的智能手機和仿真器與Android 5.1/6和幾個項目/應用程序。
實施例的代碼(僅比調試更重要的信息被示出):
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
Log.v(TAG, "verbose test");
Log.d(TAG, "debug test");
Log.i(TAG, "info test");
Log.w(TAG, "warn test");
Log.wtf(TAG, "what a terrible failure test");
Log.e(TAG, "error test");
}
編輯:logcat的輸出爲上面的代碼(用「詳細」 &「只顯示所選applictaion」過濾器選項):
12-02 22:01:13.531 14717-14717/? I/art: Late-enabling -Xcheck:jni
12-02 22:01:13.593 14717-14730/de.kinoblub.testapp E/HAL: load: id=gralloc != hmi->id=gralloc
12-02 22:01:13.621 14717-14717/de.kinoblub.testapp W/System: ClassLoader referenced unknown path: /data/app/de.kinoblub.testapp-1/lib/arm64
12-02 22:01:13.624 14717-14717/de.kinoblub.testapp I/InstantRun: Instant Run Runtime started. Android package is de.kinoblub.testapp, real application class is null.
12-02 22:01:13.717 14717-14717/de.kinoblub.testapp W/System: ClassLoader referenced unknown path: /data/app/de.kinoblub.testapp-1/lib/arm64
12-02 22:01:13.837 14717-14717/de.kinoblub.testapp I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
12-02 22:01:13.883 14717-14717/de.kinoblub.testapp W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
12-02 22:01:14.031 14717-14717/de.kinoblub.testapp I/de.kinoblub.testapp.Main2Activity: info test
12-02 22:01:14.031 14717-14717/de.kinoblub.testapp W/de.kinoblub.testapp.Main2Activity: warn test
12-02 22:01:14.031 14717-14717/de.kinoblub.testapp E/de.kinoblub.testapp.Main2Activity: what a terrible failure test
12-02 22:01:14.044 14717-14717/de.kinoblub.testapp E/de.kinoblub.testapp.Main2Activity: error test
12-02 22:01:14.067 14717-14717/de.kinoblub.testapp I/HwSecImmHelper: mSecurityInputMethodService is null
12-02 22:01:14.167 14717-14747/de.kinoblub.testapp E/HAL: load: id=gralloc != hmi->id=gralloc
12-02 22:01:14.167 14717-14747/de.kinoblub.testapp I/OpenGLRenderer: Initialized EGL, version 1.4
12-02 22:01:14.235 14717-14717/de.kinoblub.testapp I/HwSecImmHelper: mSecurityInputMethodService is null
一切完成,沒有任何幫助:( – False