Error loading project in Android Studio: cannot load modules
When I Checkout a project form Google Cloud, Android Studio sais: "2 modules cannot be loaded. You can remove them from the project" and I cannot see the project. The error is in the iml files app.iml and ProjectName.iml.
Thanks!
Solution 1:
Delete the *.iml files and rebuild the project (Build > Rebuild), it should be ok after that.
Solution 2:
The best way to get rid of this problem is below:
1- close the project
2- close Android Studio IDE
3- delete the .idea directory
4- delete all .iml files
5- open Android Studio IDE and import the project again
Solution 3:
Removing modules.xml
file under the /.idea
folder solved my issue.
Solution 4:
I think you can take the IDE automatic advice of deleting the xxx.iml files
Solution 5:
As was already answered here the best solution is deleting all .iml files, but it could be done just Refreshing Gradle Project at Gradle tab> right click on your project > Refresh Gradle Project.
Then a Clean and Rebuild should be done also.
Edit:
The screenshot: