1.打开AS
2.选择File -> Setting -> Editor -> Live Templates
3.打开AndroidLog下的分支
4. 根据自己的LogUtils 来定义快捷键中的 Log代码,例如
com.xxx.utils.LogUtil.d(TAG, "$METHOD_NAME$: $content$");
5.点击Edit variables, 在弹出的窗口的Expression选项中选择methodName() ,然后在后面的skip if define打上对勾 点ok就可以了