[英]Error in renaming package: “Cannot create file 'com'. File already exist.”
The problem is that in the debug folder, the folder is already in the google folder.问题是在debug文件夹中,该文件夹已经在google文件夹中了。 There is also a folder with the name of my first part of the package.
还有一个文件夹,里面有我的包的第一部分的名称。 So when I try to rename the first part of the package in my project, I get an error:
Cannot create file 'D:\\...\\...\\...\\build\\generated\\source\\r\\debug\\com'. File already exist.
因此,当我尝试重命名项目中包的第一部分时,出现错误:
Cannot create file 'D:\\...\\...\\...\\build\\generated\\source\\r\\debug\\com'. File already exist.
Cannot create file 'D:\\...\\...\\...\\build\\generated\\source\\r\\debug\\com'. File already exist.
In my other projects, the folder with the name of the first part of the package is built in the folder 'com', and here in the 'debug' itself.在我的其他项目中,具有包第一部分名称的文件夹构建在文件夹 'com' 中,这里是在 'debug' 本身中。 Tell me, what can I do?
告诉我,我能做什么? Can I somehow change the build path of this folder in debug?
我可以在调试中以某种方式更改此文件夹的构建路径吗?
Go to Project view in left pane -> (project name folder) -> build转到左侧窗格中的项目视图->(项目名称文件夹) -> 构建
There you will get 3 or 4 folders like: generated, intermediate, outputs like this:在那里你会得到 3 或 4 个文件夹,如:生成的、中间的、输出如下:
Select all 3 or 4 folders in that build folder and delete them.选择该构建文件夹中的所有 3 或 4 个文件夹并将其删除。
Go to Android view in left pane and try to refactor your package name转到左侧窗格中的Android 视图并尝试重构您的包名称
After that rebuild your project.之后重建你的项目。
That's it!就是这样!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.