Android Studio The project is already registered

前端 未结 4 575
南方客
南方客 2021-01-13 06:34

I\'ve a big problem with Android Studio. I have a project that depends on two other projects (as libs). I followed the guide Problems importing project into Android Studio r

相关标签:
4条回答
  • 2021-01-13 07:09

    you should remove the project from respective gradle/sbt/maven/ant tab (used to be on right vertical line of Android Studio/Intellij IDEA)

    See this answer: https://stackoverflow.com/a/30442195/907576

    0 讨论(0)
  • 2021-01-13 07:15

    I had a similar problem with ABS and other library imports. The 'Project Structure' interface just wouldn't show the modules. On trying to import the modules, it would prompt, "The project is already registered". Seems to be an IntelliJ/Android Studio issue. Invalidate Caches option didn't help.

    Reimporting the project after some cleanup did work for me.

    1. As a precaution, take a backup of your project and store it safely
    2. Ensure that your project builds via gradle command-line and you have all required dependencies specified in respective build.gradle files. Try building with: gradle clean && gradle build
    3. Close the project in Android Studio (or close Android Studio)
    4. Delete .iml files and .idea folders from all modules and the main project
    5. Start Android Studio and reimport the project (Import project from external model > Gradle)
    0 讨论(0)
  • 2021-01-13 07:23

    In ij go to menu: View -> Tool Windows-> Gradle Right click on the problematic module and click Refresh External Project, You should see the module in project explorer.

    0 讨论(0)
  • 2021-01-13 07:30

    Look around in your .idea directory for mentions of the problematic project. I had the same problem and resolved it by deleting the entry from .idea/sbt.xml.

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