Androidスタジオのlogcatは、出力がLog.v/.d
または未処理のランタイム例外(nullpointerなど)の後にスタックトレースして表示されず、アプリケーションがクラッシュしたときに情報が表示されません。 Log.i/.w/.wtf/.e
メッセージが表示されることがあります。また、Androidクラスからのメッセージ(ときどき!)とAndroidシステムの出力(通常は常にlogcatに表示されます)のselfgenerated
メッセージが表示されます。logcatにデバッグメッセージが表示されない
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