在IDE中新建接口时无法新建,报错说template不能生成一个class或者一个接口,

新建接口报错Error message: This template did not produce a Java class or an interface

解决办法:是因为对应的模板为空,打开File->Settings->Editor->File and Code Templates->Interface

新建接口报错Error message: This template did not produce a Java class or an interface

红色区域为空,将一下内容复制上去就可以了:

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end #parse("File Header.java") public interface ${NAME} { }

相关文章:

  • 2021-04-26
  • 2021-11-06
  • 2022-12-23
  • 2021-12-20
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
猜你喜欢
  • 2021-09-15
  • 2021-09-07
  • 2021-04-25
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-09-03
相关资源
相似解决方案