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

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

    Sometimes the errors exists in Android-manifest because of that there is cross like image over run/debug configuration hence try to look over if Android-manifest has any errors in just case.

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

    Well, nothing worked for me from all the answers. Finally, I clicked Run > Edit Configuration. On the left, u can choose a new main module and remove to deleted ones.

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

    In Android Studio 3.1.2 I have faced the same issue. I resolved this issue by click on "File->Sync Project with Gradle Files".This works for me. :)

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

    I added this line to my app.iml file and it works

    orderEntry type="library" exported="" name="appcompat-v7-19.1.0" level="project" />

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

    For my case, a newbie I boogered up my project, not sure how but it would not longer run and complained about the manifest, the R, everything. I realized that some how in my settings.gradle did not have include ':app' once I added this, I was back on my way.

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