有办法删除一个模块在Android工作室? 当我右键单击一个模块,我找不到删除选项,是在其他地方吗?


当前回答

设置。gradle[About]文件负责项目中的模块

从settings.gradle中删除<module_name>。它还可以包含projectDir设置 删除<module_name> build.gradle中的模块

implementation project(':<module_name>')

用Gradle文件同步项目

其他回答

对于最新的Android Studio版本,删除Android Studio中的一个模块:

1. Open File -> Project Structure
2. Choose the Modules section from the left column.
3. In the right panel opened ,select the module you want to delete.
4. After selecting the module tap the (-) icon on the top to delete the respective module.

在Android studio v1.0.2中

方法1

进入项目结构,文件->项目结构…,如下图所示,单击-图标可移除模块。

方法2

编辑文件设置。Gradle并删除要删除的条目。例如,将文件从包含“:app”,“:apple”编辑为包含“:app”。

这在大多数情况下都是可行的,但是最后如果你不再需要它,你必须手动从磁盘中删除它。

(编者注:这个答案在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.

如果你想手动删除(对我来说更容易),请遵循以下步骤:

让我们以“teste”为例。

1 -首先将资源管理器更改为“项目”,并打开“settings.gradle”;

2 -删除你想要的模块;

3 -转到项目的根文件夹,删除模块文件夹。