As 启动项目出现unsupported modules detected
首先是出现如下情况:
unsupported modules detected Compilation is not supported for following modules: app. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project
然后项目正下方一直出现加载:indexing paused due to batch update
自从更新到android studio 3.2之后,首次打开项目出现错误:indexing paused due to batch update(由于批量更新而暂停的索引),个人猜想可能是第一种情况导致的吧。然后网上查找到了一些方法如下:
1、关闭Android Studio ,去项目根目录删除.idea文件,重启AS搞定
2、File -> Invalidate Caches / Restart -> Invalidate Caches & Restart.
3、File -> Sync Project With Gradle Files
当时我试过后面两种不行,第一种就OK。
推荐参考:https://stackoverflow.com/questions/28668252/android-studio-error-unsupported-modules-detected-compilation-is-not-supported