有没有点这些规则?
文件夹内的每个文件被翻译成R.java类中的Java字段名:
Each file inside folder is translated into java field name inside R.java class:
drawable\icon.png -> R.drawable.icon
因此,为何不使用文件名里的特殊字符,因为它们无法在Java名称中使用。
Hence the reason for not using special characters inside file names, as they can no be used in Java names.
至于大写字母,我想这是为了避免一个小问题在Windows与Linux环境。这是因为Linux认为的icon.png
和的icon.png
是不同的文件,Windows认为的icon.png
和的icon.png
是同一个文件。因此,使用Linux可以创建应用程序,未在Windows编译任何人。
As for capital letters, I guess that's to avoid one little problem in Windows vs. Linux environment. That's because Linux thinks that Icon.png
and icon.png
are different files, and Windows thinks that Icon.png
and icon.png
is the same file. So anyone using Linux can create application that is not compilable on Windows.