新建class文件报错
百度后,原因为:没有class模板
解决方案:在file>settings>File and Code Templates>class中添加如下代码:
#if (${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end #if (${IMPORT_BLOCK} != "")${IMPORT_BLOCK} #end #parse("File Header.java") #if (${VISIBILITY} == "PUBLIC")public #end #if (${ABSTRACT} == "TRUE")abstract #end #if (${FINAL} == "TRUE")final #end class ${NAME} #if (${SUPERCLASS} != "")extends ${SUPERCLASS} #end #if (${INTERFACES} != "")implements ${INTERFACES} #end { }