Android Studio not showing modules in project structure

115,189

Solution 1

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

enter image description here

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

enter image description here

Solution 2

First, create your Module. You can do that using the default Android Studio Module Wizard (File -> New -> New Module), select Android Library, give it a Name and a package name, and finish. After that you will see that nothing happens. Open the side Gradle Projects Section (should be somewhere on the right panel)

You should see something like this:

enter image description here

Expand your module gradle and run the Run Configurations task. After that refresh the content and refresh the project structure.

It should work now.

Solution 3

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

Solution 4

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

Solution 5

You need to add a gradle.settings file to your root project structure, after that when you "Open Module settings" you will the menu aligned to your gradle.settings. When importing a project to Android Studio, it doesn't create this file for you. Sometimes it's usually better to start a clean project and move your code there, it's usually easier to achieve.

Share:
115,189
Mohamd Ali
Author by

Mohamd Ali

I'm IT engineer programming in anything that has syntax.

Updated on July 09, 2022

Comments

  • Mohamd Ali
    Mohamd Ali almost 2 years

    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 library in the menu :\

    In intelij it's appearing:

    enter image description here

    So what's the problem? How can I add these modules in Android studio?