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

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

    None of the previous answers worked for me, so I deleted and reinstalled Android Studio. Worked like a charm.

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

    The following worked for me:

    • edit the overall project's 'settings.gradle' file and add a line at the bottom to include your new module (include ':myNewModule') - e.g:
    include ':myNewModule'
    
    • Synch gradle.
    • Add a build.gradle file into your new module directory. You need to make sure the first line says 'apply plugin: 'com.android.application'. Simply copying a build.gradle from another module in your project, if you have one, seems to work.
    • Synch Gradle
    • Your module should now show up in 'Edit Configurations'
    0 讨论(0)
  • 2020-11-29 16:29

    Add your module in your applications .iml file like:

    orderEntry type="module" module-name="yourmoudlename" exported="" 
    

    It works for me.

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

    In your module build.gradle file make sure you have the correct plugin set. it should be

    apply plugin: 'android'
    
    0 讨论(0)
  • 2020-11-29 16:30
    1. Close all Android Studio projects

    2. Remove the project from the recent projects in Android Studio wizard

    3. Restart Android Studio

    4. Use import option (Import project- Gradle, Eclipse ADT, etc.) instead of open an existing

    5. Project AS project

    6. File -> Sync project with gradle files

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

    These types of problems are related to AndroidManifest.xml, so check the bugs thats are in AndroidManifest file.

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