简体   繁体   English

关于重命名Android项目gen文件夹中的包的一些问题

[英]Some questions about rename a package which is in the gen folder for Android project

I downloaded a project from the Internet, and I wanted to rename all the classes in this project.我从网上下载了一个项目,我想重命名这个项目中的所有类。 However, there was something wrong in the gen folder.但是,gen 文件夹中有问题。 I can not rename the class which was in the gen folder.我无法重命名 gen 文件夹中的类。 I can find the reason whatever I try my best to change it.我可以找到原因,我尽我所能去改变它。 Please help me to sort it out, thanks.请帮我整理一下,谢谢。

重命名 gen 文件夹中的包

改名

有错误

重命名完成,但旧名称仍然存在

您应该先在 AndroidManifest.xml 中重命名包。

Rename your package.重命名您的包。 TO make Eclipse notice that, the simplest approach would be to press right mouse button over your project name in Package Explorer, then select Android Tools then Rename Application Package .要让 Eclipse 注意到这一点,最简单的方法是在 Package Explorer 中的项目名称上按鼠标右键,然后选择Android Tools然后Rename Application Package In case of problems you may remove all content of gen, do "Project" -> "Clean" and try to rebuild.如果出现问题,您可以删除 gen 的所有内容,执行“项目”->“清理”并尝试重建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM