Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: Module won't show up in "Edit Configuration"

Make sure your build.gradle is

apply plugin: 'com.android.application'

not

apply plugin: 'com.android.library'

After you have changed, please sync your gradle again.

enter image description here


I had similar issue when I selected parent directory of my project, I resolved by Close Project -> Delete Project from Android Studio -> Import Project by selecting right build.gradle file.

Make sure you select right build.gradle file while import.


I fixed this by adding facets in Module settings. They were missing. right click on project > open Module settings > Facets > Add facets ( "+" sign at the top ) > Android. After adding facets you will have modules.

UPDATE:

For latest version of gradle, Facets have been removed, you can directly add modules now. right click on project > open Module settings > Add module ( "+" sign at the top ) > Phone and Tablet Application (Now you can create a new module and configure it).


In Android Studio 3.1.2 I have faced the same issue. I resolved this issue by click on "File->Sync Project with Gradle Files".This works for me. :)


resolved this issue by clicking on "File->Sync Project with Gradle Files"


New project. Fixed this issue by clicking on "File->Sync Project with Gradle Files"


I have tried all the options with no luck. So I have ended up with my working solution. Just make following steps:

  1. Close android studio if open.
  2. Copy module(project) in your current workspace.
  3. Start android studio.
  4. You will see added module in project structure.
  5. Open settings.gradle of your project and include ':YOUR_MODULE_NAME'.
  6. Sync gradle and you can see module is successfully added to your project.