Android Studio:无法向项目添加新类或任何文件 [英] Android Studio : Unable to add a new class or any file to a project

查看:261
本文介绍了Android Studio:无法向项目添加新类或任何文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Android运行良好,能够向我的项目添加新的xml,活动或任何新文件.直到最近,每当我添加新类或任何新文件时,它都会产生错误.它总是说:

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:

无法解析模板类"错误消息:无法修改 只读目录 'C:\ Users \ jay \ Desktop \ CurLoc \ app \ src \ main \ java \ com \ example \ jay \ curloc'.

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'.

我已经尝试通过取消选中属性"中的只读"框来更改项目所在文件夹的属性.我也一遍又一遍地重启计算机和Android Studio,并刷新了项目,但没有任何效果.请帮忙.

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.

推荐答案

花了无数时间尝试解决问题后,我卸载了Android Studio并重新安装了它,从而解决了问题.我认为这是Android Studio中的错误

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

这篇关于Android Studio:无法向项目添加新类或任何文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆