我注意到Gradle的build输出不会解码unicode字符。
示例(Android Studio构建输出):
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dataBindingGenBaseClassesDebug'.
> Found data binding error(s):
[databinding] {"msg":"\u003cTextView id\u003d\u0027@+id/title\u0027\u003e conflicts with another tag that has the same ID","file":"C:\\Users\\maiaf\\AndroidStudioProjects\\MyApplication\\app\\src\\main\\res\\layout\\fragment_info.xml","pos":[{"line0":37,"col0":8,"line1":46,"col1":62}]}
(...)
是否有一种方法可以对Unicode字符(例如\u003c
,\u003d
ecc)进行解码,以使生成的输出更具可读性?
我在这里找不到任何东西,也许我不知道正确的关键字。
我想要:
[databinding] {"msg":"<TextView id='@+id/title'> conflicts with another tag that has the same ID","file":"C:\Users\maiaf\\AndroidStudioProjects\MyApplication\app\src\main\res\layout\fragment_info.xml","pos":[{"line0":37,"col0":8,"line1":46,"col1":62}]}
代替:
[databinding] {"msg":"\u003cTextView id\u003d\u0027@+id/title\u0027\u003e conflicts with another tag that has the same ID","file":"C:\\Users\\maiaf\\AndroidStudioProjects\\MyApplication\\app\\src\\main\\res\\layout\\fragment_info.xml","pos":[{"line0":37,"col0":8,"line1":46,"col1":62}]}