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


当前回答

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

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

implementation project(':<module_name>')

用Gradle文件同步项目

其他回答

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

让我们以“teste”为例。

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

2 -删除你想要的模块;

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

假设:

你正在使用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 1.0.2的解决方案。

步骤1:右键单击从文件夹层次结构中选择的“项目名称”,如图所示。注意:通过右键单击项目名称并从上下文菜单中选择delete,也可以从窗口右侧的指挥官视图中删除它。

第二步:项目被删除了(看起来),但gradle似乎保留了项目应用文件夹的记录(通过点击gradle View查看)。现在转到文件->关闭项目。

步骤3:现在您处于开始窗口。在最近项目列表上移动光标。按下删除。

第四步:通过移动或删除文件夹从资源管理器中删除。这个位置是在your_user_name->Android Studio Projects->…

第五步:回到Android工作室窗口,项目就永远消失了。你现在可以开始一个新项目了。

对于最新的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 0.5.1中,你必须通过简单地执行File ->关闭项目来关闭项目,然后将鼠标移动到你想要删除的项目上,然后将鼠标保持在同一个项目上,然后按delete,然后单击“OK”按钮,这将从Android Studio中删除你的项目。