本文介绍了在Android Studio中重命名模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我选择了导入到Android Studio Gradle项目中的特定模块的错误名称。 在这张脸上,我想重命名模块 Facebook1 到 Facebook 。 在Gradle项目中这是可能的,以及如何做到这一点? 解决方案 Android Studio> = 1.4.1 右键单击模块 - >重构 - >重命名。 输入模块的新名称,然后单击确定。 旧版Android Studio 以下工作适用于我,在Android Studio(AS)1.1& 1.0.2,直接导入项目后。 在'Android'树视图(ATV)下, 右键单击模块名称: app ,Refactor - > Rename(to myApp ,点击确定) 打开 settings.gradle 更改' :app'至':myApp',并保存 系统会提示您'立即同步',做到这一点(提示符是文件上方的蓝色链接) (您的项目将从ATV消失,但不用担心,只需退出AS ) 从文件管理器(Android Studio之外)打开您的项目根目录,然后重命名文件夹 app 至 myApp 重新打开AS中的项目,你会看到你的模块和Gradle脚本重新出现在ATV下! :) 恭喜,您的模块现在已被重命名! (喝茶的时间)I picked the wrong name of a specific module which I imported to the Gradle project in Android Studio.In this face I want to rename module Facebook1 to Facebook.Is this possible in Gradle project and how to do it? 解决方案 Android Studio >= 1.4.1Right click the module -> Refactor -> Rename.Enter the new name of the module, click OK.Older versions of Android StudioThe following worked for me, tested in Android Studio (AS) 1.1 & 1.0.2, directly after importing a project.Under the 'Android' tree view (ATV),Right click the module name: app, Refactor -> Rename (to myApp, click ok)Open settings.gradleChange ':app' to ':myApp', and saveYou will be prompted to 'Sync Now', do it (the prompt is a blue link above the file)(Your project will disappear from ATV, but don't worry, just exit AS)From a file manager (outside of Android Studio), open your project root directory, and rename the folder app to myAppRe-open your project in AS, and you will see your module and Gradle scripts re-appear under ATV! :)Congratulations - your module has now been renamed! (whew, time for some tea) 这篇关于在Android Studio中重命名模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-11 05:26