问题描述
所以我知道如何重命名一个包,但只是改变了结束
So I know how to rename a package, however that just changes the end
包com.example.android.navigationdrawerexample;
package com.example.android.navigationdrawerexample;
在这个例子中就是我想要做的就是摆脱.EXAMPLE的
In this example what I want to do is get rid of the .example
如何去这个不破事?
推荐答案
我在做什么是打开一些类文件,去顶,并选择要重命名包的一部分,右键点击它,去重构>重命名。我想工作室应该问你,那么你是否想重命名或者目录或全包 - 选择后者
what i'm doing is to open some class file, go to the top and choose the part of the package you want to rename, right click on it and go to Refactor > Rename. I guess Studio should ask you then whether you want to rename either directory or whole package - choose the latter.
比如,当你有包pl.warsjawa.android2;
并要更改 warsjawa
到 dzwoniec
右键点击warsjawa - >重构 - >重命名
E.g when you have package pl.warsjawa.android2;
and want to change warsjawa
into dzwoniec
right click on warsjawa -> Refactor -> Rename.
这篇关于在Android Studio中:如何更改包文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!