Android Studio : Unable to add a new class or any file to a project

浪尽此生 提交于 2019-12-23 08:40:14

问题


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



来源:https://stackoverflow.com/questions/31374605/android-studio-unable-to-add-a-new-class-or-any-file-to-a-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!