[CHORE] 新增 .editorconfig 防止 XML 檔頭 UTF-8 BOM(aapt2 打包防呆)
供 UIUX 設計師直接在本 repo 改 UI 時,編輯器不再寫入 BOM 導致 aapt2 失敗。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
42947dce0c
commit
b56c539549
22
.editorconfig
Normal file
22
.editorconfig
Normal file
@ -0,0 +1,22 @@
|
||||
root = true
|
||||
|
||||
# 全專案預設:UTF-8(不含 BOM)、LF、檔尾換行
|
||||
# 重點:charset = utf-8(非 utf-8-bom)可避免編輯器在 XML 開頭塞入 BOM,
|
||||
# 否則 aapt2 會報「Cannot read field "elmName" because "root" is null」導致打包失敗。
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.{xml,java,kt,kts,gradle,pro}]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# 二進位資源不套用規則
|
||||
[*.{png,webp,jpg,jpeg,gif,ttf,otf,9.png}]
|
||||
charset = unset
|
||||
end_of_line = unset
|
||||
insert_final_newline = unset
|
||||
trim_trailing_whitespace = unset
|
||||
Loading…
Reference in New Issue
Block a user