I have a large Android Studio NDK project. A while ago, it started taking hours to open and I could not figure out why. Today I notices on the file view that the root is now for some reason considered my home directory, so it is indexing all my projects and a lot of unrelated content. Where is this project root actually defined. I have looked all around and also flushed the caches, but I can't seem to find it.
Well I found the line that has caused me months of headaches. We primarily develop in Xcode, but Android Studio has been causing issues for many many months. It turns out it was simply an extra line in Android.mk
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../../Classes \
$(LOCAL_PATH)/../../../../.. \
The second line there for some reason included two folders above the containing folder. One of us programmers must have been trying to fix an include issue and brought the system to its knees, taking hours to do what normally takes 45 seconds. I hope this helps someone.