使用Android Studio重命名Android包名称 [英] Renaming Android package name using Android Studio
本文介绍了使用Android Studio重命名Android包名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个Android应用,程序包名称为 com.example.******.sample .我需要将包名称重构为 org.newOrg.*******.sample .我已经尝试过重构方法.但是其父"com"未更改为"org".告诉我任何重构整个软件包名称的解决方案.
I Was Created an android application with package name of com.example.******.sample . I need to refactor the package name into org.newOrg.*******.sample . I was already tried refactor method. But its parent "com" was not changed into "org" . Tell me any solution to refactor the entire package name.
预先感谢
推荐答案
此修改需要三个步骤:
- 更改清单中的软件包名称
- 在树形视图中右键单击->重构->重命名来重构软件包的名称,然后Android Studio将显示一个窗口,选择重命名软件包"
- 在build.gradle文件中手动更改应用程序ID:android/defaultconfig/应用程序ID 然后清理/重建项目
- Change the package name in the manifest
- Refactor the name of your package with right click -> refactor -> rename in the tree view, then Android studio will display a window, select "rename package"
- Change manually the application Id in the build.gradle file : android / defaultconfig / application ID Then clean / rebuild the project
这篇关于使用Android Studio重命名Android包名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文