Unable to parse template "Interface" Error Message; and Unable to parse template "class" solve in idea, unable to create classes and interfaces

The reason for this error is Unable to parse template “Interface” Error Message; This Template did not Produce a Java Class or an interface About this error, it means that there is no template for class or interface.

method one:

Right-click Idea. Open the location of the file,

or

 

 find these two files

In these two files, add, -Djdk.util.zip.ensureTrailingSlash=false

Then restart idea, you will find that you have everything, this is the best way, personal recommendation,

Of course, you can also configure these two templates according to the second method below,

Method Two:

如果出现:This Template did not Produce a Java Class or an interface,

Just click on File -> Settings->Editor ->Code Style ->File and Code Templates to add in the right text box,

#if (${
    
    PACKAGE_NAME} && ${
    
    PACKAGE_NAME} != "")package ${
    
    PACKAGE_NAME};#end

#parse("File Header.java")

public class ${ NAME} {}

As shown in the picture:

Appears: Unable to parse template “Interface” Error Message, as above, plus

#if (${
    
    PACKAGE_NAME} && ${
    
    PACKAGE_NAME} != "")package ${
    
    PACKAGE_NAME};#end

#parse("File Header.java")

public interface ${
    
    NAME} {}
 
 

The first method is to get all the templates down. The second method is to configure these two types. It is the first time to post a blog. If there is any mistake, please correct me.

Guess you like

Origin blog.csdn.net/luolearn/article/details/80267814