在Eclipse中,我们一般使用Ctrl+Shift+F来格式化代码,Android Studio中需要换成: Reformat code CTRL + ALT + L (Win) OPTION + CMD + L (Mac)