如何重命名的Andr​​oid包叫什么名字?叫什么名字、重命名、Andr、oid

2023-09-12 00:45:30 作者:笔墨落

pressing Shift + F6似乎只重命名最后一个目录。例如,在项目com.example.test它将提供仅重命名测试。这同样适用,如果我浏览到的.java或清单文件和preSS Shift + F6包的名字。

Pressing Shift+F6 seems to rename the last directory only. For example, in the project com.example.test it will offer to rename test only. The same applies if I navigate to package name in .java or Manifest file and press Shift+F6.

推荐答案

你可以这样做:

在清单文件手动更改包名称。 点击你的 R.java 类和preSS F6 (Refactor->移动...)。它可以让你移动类到其它的包,并以该类的所有引用将被更新。 Change the package name manually in the manifest file. Click on your R.java class and the press F6 (Refactor->Move...). It will allow you to move the class to other package, and all references to that class will be updated.