I'm using cocos2d-x v4, macOS Catalina 10.15.6, Android Studio 4.1.
I made a project with cocos2d-x v4.
I'm using Android Studio to build an android app.
Until a few days ago it worked. But after updating Android Studio to 4.1, everything went wrong. When I open the project, it says Scanning files to index .. at the bottom of Android Studio and it never ends.
The Android tab on the left always says loading ..
I tried the following, but none of them solved the problem.
When I uninstalled Android Studio, I ran the following command to remove all the old files.
rm -Rf /Applications/Android\Studio.app
rm -Rf ~ / Library / Preferences / AndroidStudio *
rm ~ / Library / Preferences / com.google.android.studio.plist
rm -Rf ~ / Library / Application \ Support / AndroidStudio *
rm -Rf ~ / Library / Logs / AndroidStudio *
rm -Rf ~ / Library / Caches / AndroidStudio *
rm -Rf ~ / .gradle
rm -Rf ~ / .android
rm -Rf ~ / Library / Android *
I spent a lot of time reinstalling Android Studio. I want to resolve this issue as soon as possible. Please let me know if there is a solution. Thank you.
I have the same but I solved by removing .idea
directory at root directory of the Android project.
A very simple solution is delete all caches:
1 close Android Studio
2 go to:
C:\Users\ME\AppData\Local\Google\AndroidStudio2020.3 // or your current version
3 then click in "caches" directory
4 then delete all the cache files (There are two folders called project_resources and resources well DO NOT DELETE THESE FOLDERS)
5 Restart Android Studio
I have the same issue with a Cocos2d-X 3.17 project. Worked perfectly in 3.5 but with 4.1 it keeps on indexing. Force stopping and reopening leads to an eternal beachball.
By removing all .iml files and the .idea folders in the project and by invalidating all caches in Studio I got the project to load. Then I let it index all night (in Activity Monitor I could see that it was reading a lot of data... far more than the 15GB the project size is) without touching anything.
In the morning it actually was done indexing. However; Studio wanted to update some components and after that the index hell started again (using an imac pro with MacOS 10.15.7).
Update: Android Studio 4.1 seems to be indexing everything on the computer. It's now working on ~/Library/Containers/com.apple.iWork.keynote. Problem is that in there, there is a symbolic link to the drive which then results in recurring scanning and rescanning of folders. This also explains why the app wanted access to contacts, calendar and reminders....
Update 2: I have seemed to have solved it for now by excluding the application project folder from the index (right click on folder, select "mark directory as" and select excluded). For the folders to show you might have to delete the .idea and .gradle folders in the project before starting Studio).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With