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

后端 未结 30 2097
情歌与酒
情歌与酒 2020-11-29 15:38

I\'ve imported a project to Android Studio with several subprojects.

I want to run a subproject.

I successfully made this subproject\'s build.gradle as a mo

相关标签:
30条回答
  • 2020-11-29 16:40

    It appears different solutions work for difference people, for me just closing the project and importing it again resolved the problem.

    0 讨论(0)
  • 2020-11-29 16:42

    For me it was fixed by simply restarting Android Studio.. Like the good old days of Eclipse

    0 讨论(0)
  • 2020-11-29 16:43

    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).

    0 讨论(0)
  • 2020-11-29 16:43

    goto Android >> Gradle Scripts>>Build Gradle(Module :app)

    make sure the first line of this file is like this.

    apply plugin: 'com.android.application'
    

    not like this

    apply plugin: 'com.android.library'
    
    0 讨论(0)
  • 2020-11-29 16:44

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

    0 讨论(0)
  • 2020-11-29 16:44

    If all the above doesn't work. Try to update your Android studio version. Steps: 1. In Android Studio, select File > Settings (or Android Studio > Preference on Mac). 2. In the left pane, select Appearance & Behavior > System Settings > Updates. 3. Be sure that Automatically check for updates is checked, and then select a channel from the drop-down list. 4. Click OK.

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