如何安全地更改android studio中的项目名称? [英] How to change the project name in android studio safely?

查看:185
本文介绍了如何安全地更改android studio中的项目名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在android studio中更改项目名称。我在stackoverflow上找到了一些答案,但它对我不起作用。请给我一些合适的解决方案。目前我正在使用Android Studio 2.3。
总是谢谢:)

I want to change the project name in android studio. I have found some answers on stackoverflow but it didn't work for me. Please suggest me some suitable solution.Currently I'm using Android Studio 2.3.
Thanks always :)

推荐答案

您需要执行几个步骤


  • 首先移动到项目视图,然后单击项目视图右上角的小设置图标,确保选中紧凑的空中间包选项

  • 右键单击您的java文件夹并选择Refactor> Rename>更改为所需的包名称并确认Refactor

  • ,而且还必须更改build.gradle文件中的项目ID

  • 仔细检查你的android manifest.xml是否也重构了(android studio应该自动处理它但是再次检查)
    这是唯一一个改变项目名称的方法对我来说。

  • First move to project view and click on the small settings icon on the top right corner of project view, make sure the compact empty middle packages option is checked
  • Right click on your java folder and choose Refactor>Rename>change to your desired package name and confirm Refactor
  • than you MUST also change the project id in your build.gradle file
  • double check if your android manifest.xml refactored too(android studio should take care of it automatically but check again) this is the only method that changed the project name from the base for me.

这篇关于如何安全地更改android studio中的项目名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆