Gradle sync failed: Already disposed: Module: 'xxx' (6 s 502 ms)

问题:

编译时出现:Gradle sync failed: Already disposed: Module: 'xxxlibrary' (6 s 502 ms)

解决:在Android Studio 工具中:

1、 File > Invalidate Caches / Restart

2、弹框中选择 Invalidate and Restart

 

之后又出现另一个问题,如下:

“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”;

解决方法:删除项目根目录删除.idea文件,重启Android Studio ;

你可能感兴趣的:(Android中遇到的那些问题)