原因:新导入的工程layout文件的默认打开方式发生了改变。 解决方案: 右键点击xml文件,在弹出的菜单中点击open with,如果是layout文件,则选择"Android Layout Editor"打开xml文件