Why the letter case inconsistency between src and res/layout?
I called my main activity Main, and Eclipse created Main.java and res/layout/main.xml for the layout.
Is there any reason why Eclipse dropped the uppercase "M" for the layout file?
Was I wrong to use upper case M for the name of my Main cla开发者_StackOverflow中文版ss (a Java convention, types start with uppercase, objects with lower case)?
Layout file names can only contain lower case letters, numbers, underscores, or periods. I'm not sure why the restriction exists, though.
Whereas Erich is correct about the restriction to only lowercase letters in resources, it is only coincidence that you named your Activity Main. No matter what you call your primary Activity the generated layout file is always called main.xml.
精彩评论