java 如何在 Android Studio 中删除导入的模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35977718/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to remove an imported module in Android Studio
提问by user1086516
I am new to Android Studio, so please go easy on the lingo and navigation. I did File -> New -> Import Module and imported what I believe was an Android library project. I don't know how to find which modules I have imported or where to go to remove them.
我是 Android Studio 的新手,所以请轻松使用术语和导航。我做了 File -> New -> Import Module 并导入了我认为是 Android 库项目的内容。我不知道如何找到我导入了哪些模块或去哪里删除它们。
回答by user1086516
Click on the project tab on the left side of the screen, click on the project section header which will drop down a list and choose Project. Find the folder you imported and select it and hit your delete key. Open settings.gradle find the line that is similar to :
include ':app', ':modulenameyouchooseduringimport'
and delete the ,':modulenameyouchooseduringimport'
Then go to Build -> Clean Project
单击屏幕左侧的项目选项卡,单击项目部分标题,这将下拉列表并选择项目。找到您导入的文件夹并选择它并按您的删除键。打开 settings.gradle 找到类似于 : 的那一行,
然后include ':app', ':modulenameyouchooseduringimport'
删除,':modulenameyouchooseduringimport'
然后去 Build -> Clean Project
回答by T D Nguyen
You can find it in:
您可以在以下位置找到它:
File --> Project Structrues --> Modules --> Dependency
from the GUI, you can find a lot more stuffs with modules.
从 GUI 中,您可以找到更多关于模块的内容。
回答by Skizo-oz??S
You can go File > File Structure > Dependencies
and then select the module that you want to delete and click on "-"
您可以去File > File Structure > Dependencies
然后选择要删除的模块并单击“-”
Also you can go there browsing : Right click on your project > Open Module Settings
你也可以去那里浏览: Right click on your project > Open Module Settings
If you can see it on the left of your IDE as a module the thing that you can do is Mark directory as excluded
and then delete
it right clicking on it.
如果你能看到它在你的IDE左侧为一个模块的东西,你可以做的是Mark directory as excluded
,然后delete
它右击它。
回答by Steve C.
Right click the module. Select Open Module Settings. In the popup click the red minus symbol in the top right corner. That will delete the module from your project. I've done this numerous times and can confirm that it does work.
右键单击模块。选择打开模块设置。在弹出窗口中单击右上角的红色减号。这将从您的项目中删除该模块。我已经这样做了很多次并且可以确认它确实有效。
EDIT
编辑
That will also give you a list of the modules that you have in your project on the left side of the popup
这还将在弹出窗口的左侧为您提供项目中的模块列表
回答by Ankit Mundada
AS OF AS-2.2: Remove the compile dependency from Build -> Edit Libraries And Dependencies. That will not remove the module itself from the project folder. To completely remove the module, you should remove it from settings.gradle
file.
AS OF AS-2.2:从 Build -> Edit Libraries And Dependencies 中删除编译依赖项。这不会从项目文件夹中删除模块本身。要完全删除模块,您应该将其从settings.gradle
文件中删除。