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

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

    I managed to fix it in Android Studio 1.3.1 by doing the following:

    1. Make a new module from File -> New -> New Module
    2. Name it something different, e.g. 'My Libary'
    3. Copy an .iml file from an existing library module and change the name of the file and rename references in the .iml file
    4. Add the module name to settings.gradle
    5. Add the module dependency in your app's build.gradle file 'compile project(':mylibrary')'
    6. Close and reopen Android Studio
    7. Verify that Android Studio recognises the module as a library (should be bold)
    8. Rename module's directory and module name by right clicking on the newly created module.
    9. Enjoy :)

提交回复
热议问题