解决Android studio无法创建Java类

原文-----------------https://blog.csdn.net/m0_37814654/article/details/77740376                 https://blog.csdn.net/zyc729/article/details/77963555

错误:

Unable to parse template "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 class ${NAME} {
}

为防止以后模板可能又被清空,找到Android studio存放文件的bin-->studio.exe.vmoptions,添加一段:-Djdk.util.zip.ensureTrailingSlash=false

然后保存 重启

原文地址:https://www.cnblogs.com/yfafa/p/8966134.html