The logging tag can be at most 23 characters

后端 未结 8 1523
-上瘾入骨i
-上瘾入骨i 2020-12-13 12:46

Since update AS 1.1 Preview 2, I\'m getting red lines under all my Log messages

Log.d(TAG, \"message\");

With message: \"

8条回答
  •  隐瞒了意图╮
    2020-12-13 13:17

    This is recent change and In this build, its a new lint check. Which says,

    Checks that the tag passed to the logging calls, if its value can be resolved, is at most 23 characters long (as required by the Logging API.)

    For more info, read 3rd point in below link.

    https://sites.google.com/a/android.com/tools/recent/androidstudio11preview2

    If you dont want to get this, minimize the number of characters in your TAG and make sure that they wont cross the length more than 23.

提交回复
热议问题