Solve Android studio cannot create Java class

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

mistake:

Unable to parse template "Interface" Error message: This template did not produce a Java class or an interface

solution:

The image below shows where to add:

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

In order to prevent the template from being emptied again in the future, find the bin-->studio.exe.vmoptions of the Android studio storage file, and add a paragraph: -Djdk.util.zip.ensureTrailingSlash=false

then save and restart

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325010235&siteId=291194637