Error: Unfortunately you can't have non-Gradle Java modules and > Android-Gradle modules in one project

前端 未结 25 2410
孤独总比滥情好
孤独总比滥情好 2020-12-12 10:29

I have an IntelliJ 14.1.2 Project consisting of two modules - one is an Android Gradle based module and the other is a Spring Java-based module with Maven.

gps-track

相关标签:
25条回答
  • 2020-12-12 10:44

    goto .idea folder open modules.xml file and see for yourself what module is there that you are not using in project currently.

    0 讨论(0)
  • 2020-12-12 10:44

    Copy the project files from the original source and paste it somewhere and then import from the Android Studio.

    0 讨论(0)
  • 2020-12-12 10:44

    Change the directory of the Project and re-open.

    0 讨论(0)
  • 2020-12-12 10:45
    1. Close the project
    2. Just delete the modules.xml in .idea folder.
    3. Open the project again.
    0 讨论(0)
  • 2020-12-12 10:46

    In my case settings.gradle contained invalid configuration.

    I changed:

    include ':app'
    rootProject.name='<somthing else>'
    

    To:

    include ':app'
    

    Error is gone. So maybe check your settings.gradle for potential errors. If this won't work try to remove cache and other tips.

    0 讨论(0)
  • 2020-12-12 10:46

    Make sure you have added your module to the settings.gradle file:

    include ':app'
    include ':your-module'
    
    0 讨论(0)
提交回复
热议问题