有办法删除一个模块在Android工作室? 当我右键单击一个模块,我找不到删除选项,是在其他地方吗?
当前回答
在做了[这个答案]中提到的事情后:https://stackoverflow.com/a/24592192/82788
选择模块(因为它在Project视图中仍然可见),按下键盘上的Delete按钮可以删除磁盘上的这个模块。(在执行回答中提到的操作之前,删除按钮不起作用。)
其他回答
编辑项目的设置。Gradle文件:删除模块名(,':xxxxx'),其中xxxxx是要删除的模块名 使用文件资源管理器删除模块文件夹
顺便说一下,当前版本的Android Studio (v3.1.2)抛出一个异常,并退出删除与一个错误,而我正在删除模块通过模块设置=>选定模块=> -(减)
最好的问候,谢谢)
(编者注:这个答案在2013年5月的Android Studio v0.1中是正确的,但在2014年7月不再准确,因为提到的菜单选项已经不存在了——请参阅最新的替代答案)。
首先你得把它标记为排除。 然后右键单击,就可以删除项目了。
假设:
你正在使用Android Studio 1.2.1或1.2.2(我还没有最新的版本,当我这样做时,我会再次编辑它)。 您的项目工具窗口显示以下视图之一:“项目”,“包”,“Android”或“项目文件”
删除Android Studio模块的操作如下:
In the Project Tool Window click the module you want to delete. Between the Tool Bar and the Project Tool Window the tool bar you will see two "chips" that represent the path to the selected module, similar to: your-project-name > selected-module-name Right click on the selected-module-name chip. A context menu with multiple sections will appear. In the third section from the bottom there will be a section that contains "Reformat Code..", "Optimize Imports..." and "Delete". Select "Delete" and follow any prompts.
在android-studio版本2中。就去
右键单击项目—>打开模块选项—>单击您的模块—>单击sign done然后按ok按钮。
设置。gradle[About]文件负责项目中的模块
从settings.gradle中删除<module_name>。它还可以包含projectDir设置 删除<module_name> build.gradle中的模块
implementation project(':<module_name>')
用Gradle文件同步项目
推荐文章
- 警告:API ' variable . getjavacompile()'已过时,已被' variable . getjavacompileprovider()'取代
- 安装APK时出现错误
- 在Android Studio中创建aar文件
- 调试在哪里。Android Studio中的密钥存储库
- Android Studio, logcat在应用程序关闭后清理
- C++ Linux的想法?
- Android Studio中的。iml文件是什么?
- Android Studio无法找到有效的Jvm(与MAC OS相关)
- 在Android Studio中改变矢量资产的填充颜色
- 用Android Studio进行调试永远停留在“等待调试器”状态
- 错误:无法运行mksdcard SDK工具
- Android Studio的警告屏幕选项在哪里?
- 如何同步项目到GitHub与Android工作室?
- Xcode 4 -构建输出目录
- Android Studio在哪里保存ProGuard映射文件?