Project already contains module with this name — Android Studio

前端 未结 15 952
长发绾君心
长发绾君心 2021-01-01 09:15

I had successfully imported a Module in my Application project in Android Studio. Then I deleted or removed the module by following the below link:

相关标签:
15条回答
  • 2021-01-01 09:43

    If any of the above answers worked for you and you are sure that your branch is clean then close your Android Studio, browse to the root of your project and delete .idea folder. Then re-launch Android studio and run your project.

    0 讨论(0)
  • 2021-01-01 09:44

    I solved the problem through this way:

    1. Open Module Settings(Mac: command + down; Windows: F4) and delete the module.
    2. Delete the module folder on the disk. You will find it at ~/AndroidStdioProjects/YourApplicationName/ModuleName.
    3. Import the Module.
    0 讨论(0)
  • 2021-01-01 09:46

    If you still see the error after removing the code from settings.gradle and the app gradle file, check the following file and remove any entries with the module name you are trying to remove.

    ./.idea/modules.xml

    <project version="4">
      <component name="ProjectModuleManager">
        <modules>
          <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
        </modules>
      </component>
    </project>
    
    0 讨论(0)
提交回复
热议问题