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

前端 未结 25 2484
孤独总比滥情好
孤独总比滥情好 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:54

    The ultimate solution to this error:

    SOLUTION 1

    Step 1 Go to File -> Invalidate Caches/Restart.

    Step 2 Close the project.

    Step 3 Go to project folder and delete .idea folder.

    Step 4 Delete YourProjectName.iml in project folder.

    step 5 You will see a folder below graddle folder, Delete YourProjectName folder (it contains another YourProjectName.iml file).

    Step 6 Open Android studio -> open existing project, and then select your project.

    **

    SOLUTION 2

    **

    Step 1: Open the Corrupted Project (The one showing error).

    Step 2: Open system.gradle file.

    step 3: add this line of code include ':app'.

    Step 4: click on the sync, to sync the gradle file.

提交回复
热议问题