AndroidStudio如何修改包名使其相同项目能在安装时不覆盖生成不同安装包

在白鹭发布安卓包时都是默认命名了包名,和调试时可能会发布多个包发布或者调试。那如如何修改包名使其相同项目能在安装时不覆盖并且生成不同安装包
一,重命名
1,首选在项目中选中需要修改的目录

2,右键选择重构》重命名

3,右键选择重构》重命名

4,输入新包名》选择重构

5,按住Ctrl+Shift+R健全局搜索之前的旧包名并且替换成功新包名

至此就修改好了包名,但是编辑器会识别很慢;肯能会出现个别类名无法识别的问题
二,清除缓存
点击做上方》文件》修复IDE然后选择清除缓存

有时候还是清理不够则需要再清除项目缓存
选择构建》Clean Project

评论