Android Studio not showing modules in project structure

后端 未结 16 957
醉酒成梦
醉酒成梦 2020-12-29 17:58

I am using Android studio and I want to add module to my project like \"action bar Sherlock\" or jar files, but when I opened the project structure there is no module or lib

相关标签:
16条回答
  • 2020-12-29 18:27

    Go to File->Project Structure-> Project Settings -> Modules.

    Click on the green colored + and add new module. select Application module and set the content root to your project module.

    Click next and then finish.

    Reference

    0 讨论(0)
  • 2020-12-29 18:31

    This Might be help some:

    To import module as library in your project.

    1. File > New > Import Module
    2. Select Valid path in Source Dir..
    3. Tick on Import > Finish

    Now Open Module setting:

    1. Go to File > Project Structure > Modules
    2. Modules > Dependency > click on Green Plus Sign.
    3. Click on Module Dependency > locate module > and Implement your module.

    if your module is not shown in "Choose Modules Window"

    Follow the below step..

    1. Open Settings.Gradle file
    2. include ':app', 'Put your module name here' and sync project.

    Follow Open Module Setting as above.

    0 讨论(0)
  • 2020-12-29 18:31

    Here's what I did to solve this problem

    • Close Android Studio
    • Quick Start -> Check out from Version Control
    0 讨论(0)
  • 2020-12-29 18:34

    Update 19 March 2019

    A new experience someone has just faced recently even though he/she did add a library module in app module, and include in Setting gradle as described below. One more thing worth trying is to make sure your app module and your library module have the same compileSdkVersion (which is in each its gradle)!

    Please follow this link for more details.

    Ref: Imported module in Android Studio can't find imported class

    Original answer

    Sometimes you use import module function, then the module does appear in Project mode but not in Android mode

    So the thing works for me is to go to Setting gradle, add my module manually, and sync a gradle again:

    0 讨论(0)
  • 2020-12-29 18:36

    I had the same problem, after switching to a branch that did not have my module, then switching back.

    Clean Project -> Rebuild Project did not work for me.

    But File -> Invalidate caches/restart did work.

    0 讨论(0)
  • 2020-12-29 18:37

    Do right mouse click on your project, then select 'Open Module Settings' - then you can add modules to your project..

    0 讨论(0)
提交回复
热议问题