idea无法创建class,Unable to parse template "Interface" Error message: This template did not produce a Ja
2018-03-18 03:38
429 查看
新增java类和接口,新建的时候,就会报错:Unable to parse template "Interface" Error message: This template did not produce a Java class or an interface在class右边框里添加下面的代码,就好了,原因是没有模版了,不能自动生成#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}
这个方法是有弊端 于是鄙人就找到了方法2根据template报错,打开file->setting->file and templates 发现里边的templates 全部是空的,class没有模板,我就从别人那里考了一份出来粘贴上,发现可以新建类了,ok,问题得到解决。但是过几天发现又出问题了,再次打开studio,发现templates又空了,总不能每次开IDE都重新复制一次
最终的解决办法如下:
打开studio所在的文件夹(在这之前请关闭studio),在bin文件夹下找到这个文件studio.exe.vmoptions使用记事本打开这个文件添加下面这句话:-Djdk.util.zip.ensureTrailingSlash=false保存,ok,重启studio,打开file and templates,发现所有的templates 都存在了,问题解决。
#parse("File Header.java")
public class ${NAME} {
}
这个方法是有弊端 于是鄙人就找到了方法2根据template报错,打开file->setting->file and templates 发现里边的templates 全部是空的,class没有模板,我就从别人那里考了一份出来粘贴上,发现可以新建类了,ok,问题得到解决。但是过几天发现又出问题了,再次打开studio,发现templates又空了,总不能每次开IDE都重新复制一次
最终的解决办法如下:
打开studio所在的文件夹(在这之前请关闭studio),在bin文件夹下找到这个文件studio.exe.vmoptions使用记事本打开这个文件添加下面这句话:-Djdk.util.zip.ensureTrailingSlash=false保存,ok,重启studio,打开file and templates,发现所有的templates 都存在了,问题解决。
-server -Xms256m -Xmx768m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djna.nosys=true -Djna.boot.library.path= -Djdk.util.zip.ensureTrailingSlash=false -da
相关文章推荐
- Unable to parse template "Annotation" Error message: This template did not produce a Java class or a
- new class的时候,提示以下错误: Unable to parse template "Class" Error message: This template did not produce
- Unable to parse template "Class" Error message: This template did not produce a Java class or an int
- 当我new class的时候,提示以下错误: Unable to parse template "Class" Error message: This template did not produce
- idea无法创建class,提示以下错误: Unable to parse template "Class"
- 如何解决Unable to parse template "Interface"Error Message;
- idea编译器不能创建class,提示以错误: Unable to parse template "Class"
- Android studio无法创建类和接口问题解决办法。提示 Unable to parse template "Class"
- 解决IDEA创建文件时,IDEA Unable to parse template "Class"的问题
- Unable to parse template "Class" Error message: Selected class file name 'ProductServlet.java' mappe
- idea: Unable to parse template "class"
- This template did not produce a Java class or an interface
- idea创建类报错:This template did not produce a Java class
- xcrun: error: unable to find utility "PackageApplication", not a developer tool or in PATH
- message from server: "Host 'xxx' is not allowed to connect to this MySQL server"
- WIN7下VC6.0无法使用打开功能(Unable to register this add-in because its DLLRegisterServer return an error)
- message from server: "Host 'xxx' is not allowed to connect to this MySQL server的解决
- IDEA出现Error running tomcat: Unable to open debugger port (127.0.0.1:50181): java.net.BindException "
- Ios9.0 canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- 修复VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot