Unable to parse template "Interface" Error message: This template did not produce a Java class or an interface
這就很尷尬了等曼,到底是哪里出了問題里烦,根據(jù)template報(bào)錯(cuò),打開file->setting->file and templates 發(fā)現(xiàn)里邊的templates 全部是空的禁谦,class沒有模板胁黑,我就從別人那里考了一份出來粘貼上,發(fā)現(xiàn)可以新建類了州泊,ok丧蘸,問題得到解決。
但是過幾天發(fā)現(xiàn)又出問題了拥诡,再次打開studio触趴,發(fā)現(xiàn)templates又空了氮发,總不能每次開IDE都重新復(fù)制一次
最終的解決辦法如下:
打開studio所在的文件夾(在這之前請(qǐng)關(guān)閉studio),
在bin文件夾下找到這個(gè)文件studio.exe.vmoptions
使用記事本打開這個(gè)文件
添加下面這句話:
-Djdk.util.zip.ensureTrailingSlash=false
保存冗懦,ok爽冕,重啟studio,打開file and templates披蕉,發(fā)現(xiàn)所有的templates 都存在了颈畸,問題解決。