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

后端 未结 30 1959
情歌与酒
情歌与酒 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:17

    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.

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

    It was fixed for me after removing and re-adding the Android and Android-Gradle Facets in the Module Settings dialog.

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

    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

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

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

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

    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.
    0 讨论(0)
  • 2020-11-29 16:25

    This worked for me: File > Project Structure... > Modules > Green Plus Symbol > Import > Then Select The Project

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