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

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

提交回复
热议问题