Android Studio : Unable to add a new class or any

2019-06-16 20:33发布

问题:

My Android was working perfectly and was able to add a new xml,activity or any new file to my project. Until recently, it gives an error whenever I add a new class or any new file. It always says:

Unable to parse template "Class" Error message: Cannot modify a read-only directory 'C:\Users\jay\Desktop\CurLoc\app\src\main\java\com\example\jay\curloc'.

I already tried to change the attribute of the folder where my project is located by unchecking Read-Only box in the Properties. I also restart my computer and Android Studio over and over again and refresh the project but nothing works. Please help.

回答1:

After spending countless hours trying to solve the problem I uninstalled Android Studio and installed it again, this solved the problem. I think it's a bug in Android Studio