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

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

    Writing in 2020 -

    If none of these worked, close android studio and then go to

    C:\Users\User.AndroidStudio(ANDROID_STUDIO_VERSION)\system and delete the caches folder

    Restart your project now, it should work.

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

    If nothing works try Import app folder not the Git root while opening Android Project and Error will be gone

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

    Press Ctrl-Alt-S > Uncheck "Android Support" plugin

    (I wish I could tell you exactly why this works, but I can't. If you want to develop for Android, try using Android Studio, which is also made by Jetbrains.)

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

    Been dealing with this issue for a while every time I tried opening a project.

    I always receive this error even though I knew I had not made any changes that should of caused this apart from exporting to zip.

    To Fix:

    • Make a new project or open project that works
    • Go to file > open > "your project"
    • Make sure your dummy project stays open. The project you were getting errors should be opened in a new window.

    This fixed it for me without doing any changes or deleting anything.

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

    For some reason, you can not delete the .idea folder

    The best way is

    • Delete all files inside of .idea
    • Delete .idea
    0 讨论(0)
  • 2020-12-12 10:50

    The following solution I found in this forum worked like a charm:

    1- close the project

    2- close Android Studio IDE

    3- delete the .idea directory in the directory where your app resides

    4- delete all .iml files in the directory where your app resides

    5- open Android Studio IDE and import the project

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