如何重命名android包名称? [英] How do I rename the android package name?

查看:29
本文介绍了如何重命名android包名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

按 Shift+F6 似乎只是重命名最后一个目录.
例如,在项目 com.example.test 中,它只会提供重命名测试.如果我导航到 .java 或 Manifest 文件中的包名称并按 Shift+F6,这同样适用.

Pressing Shift+F6 seems only to rename the last directory.
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.

那么有没有办法重命名包?

So is there a way to rename the package?

推荐答案

您可以这样做:

  1. 在清单文件中手动更改包名称.
  2. 单击您的 R.java 类,然后按 F6(重构->移动...).它将允许您将该类移动到另一个包,并且对该类的所有引用都将被更新.
  1. Change the package name manually in the manifest file.
  2. Click on your R.java class and the press F6 (Refactor->Move...). It will allow you to move the class to another package, and all references to that class will be updated.

这篇关于如何重命名android包名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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