重命名包 Android Studio [英] Rename Package Android Studio
问题描述
我知道这里有很多关于此的信息.但我找不到我的特定问题的答案.
我正在尝试重命名当前如下所示的包:
com.example.app.name
我想把它重命名为
com.example.name
我知道你必须重构重命名并确保你关闭了压缩空中间包",但我只知道当它们是三个目录时如何重命名它们,即 com.example.name
而不是如何真正摆脱目录之一.那么如何将其从 4 减少到仅 3?
希望我正确解释了这一点.
Rename Package Android Studio com.example.app.name
到 com.example.name
>
步骤:
- 关闭/取消选择紧凑型空中间包.
- 将所有源从名称"移动到应用".
- 删除姓名".
- 将应用程序"更改为名称".:D
I know there is a lot of info on this here. But I can't find the answer to my particular question.
I'm trying to rename a package that is currently like this:
com.example.app.name
and I want to rename it to
com.example.name
I know you have to do refactor rename and make sure you have 'compact empty middle packages' turned off but I'm only know how to rename them when they are three directories long i.e. com.example.name
and not how to actually get rid of one of the directories. So how do I reduce it from being 4 to only 3?
Hope I explained this correctly.
Rename Package Android Studio com.example.app.name
to com.example.name
Steps:
- Close/Unselect Compact Empty Middle Packag.
- Move all source from "name" to "app".
- Delete "name".
- Change "app" to "name". :D
这篇关于重命名包 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!