2

The logt abbreviation not work, but logd or logm works, in AndroidStudio live templates. When input logt, it generates private static final String TAG = "Cannot invoke method length() on null object";, and its expression is "groovyScript("_1.take(Math.min(23, _1.length()));", className())". It seems noting is wrong, but the logt result is wrong.

Android Studio Arctic Fox | 2020.3.1 Patch 3 macOS 11.4

AnswerZhao
  • 366
  • 3
  • 13

1 Answers1

0

Like me, it seems to be caused by className() in groovy,

This is my temporary solution:

Replace with fileNameWithoutExtension().

Here:

groovyScript("_1.take(Math.min(23, _1.length()));", fileNameWithoutExtension())
Jared DC
  • 35
  • 6