[英]How to change the project name in Android Studio safely?
I want to change the project name in Android Studio.我想在 Android Studio 中更改项目名称。 I have found some answers on Stackoverflow but it didn't work for me.我在 Stackoverflow 上找到了一些答案,但对我不起作用。 Please suggest me some suitable solution.Currently I'm using Android Studio 2.3.请建议我一些合适的解决方案。目前我使用的是 Android Studio 2.3。
Thanks always :)永远感谢:)
You need to perform a few steps您需要执行几个步骤
This did the trick for me:这对我有用:
Check this: https://stackoverflow.com/a/28324892/4161284检查这个: https : //stackoverflow.com/a/28324892/4161284
Perform the following Steps :执行以下步骤:
Step 1 - Rename:第 1 步 - 重命名:
Step 2 - Update app name in String file:第 2 步 - 更新字符串文件中的应用程序名称:
What helps for me is:对我有帮助的是:
Note: There might be a .iml
file with the old name.注意:可能有旧名称的.iml
文件。 It can be renamed if you want the project to be completely clean.如果您希望项目完全干净,可以重命名它。
Below strategy worked for me:以下策略对我有用:
If settings.gradle contains the below line, change it to the new project name or remove it如果settings.gradle包含以下行,请将其更改为新的项目名称或将其删除
rootProject.name = 'Your project name' rootProject.name = '你的项目名称'
Clean the project and Build it清理项目并构建它
thanks谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.