Android doesn't show logcat messages

天大地大妈咪最大 提交于 2020-01-04 05:27:24

问题


It is only showing the Error messages for my app. It is a navon platinum 10. I tried setprop with log level with adb but no luck!

UPDATE

  • android studio (latest)
  • No Filter
  • Device recognised by adb and Logcat (show only Error messages)
  • android 6.0 Navon Platinum 10

Tried:

  • android:debuggable="true"
  • <uses-permission android:name="android.permission.READ_LOGS" />
  • adb shell pm grant com.something.MyAppMame android.permission.READ_LOGS
  • adb shell setprop log.tag.MyLogger VERBOSE

回答1:


Which version of Android are you using? On Android 6+, the following command should work: adb shell pm grant com.something.appname android.permission.READ_LOGS




回答2:


Try these steps first: 1. Go to the device tab, click your device. and go back to the logcat tab 2. You might have filter set. 3. You are probably viewing the wrong package.

And if problem still exists then try this method: Go to Windows - Preferences - Android - Logcat . On that page "Show logcat view if message priority is at least " select VERBOSE..




回答3:


Make sure your AOS properties have not disabled logcat. Check with:

$ su
# getprop |grep logcat

This is usually done in /system/build.prop:

# Disable logcat
logcat.live=disable


来源:https://stackoverflow.com/questions/42759420/android-doesnt-show-logcat-messages

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!