Try changing the settings of the virtual machine?
Your virtual machine may be running out of memory or you may be under pressure from the memory. You can try to increase the amount of memory available for Android Studio under Help , you can choose Edit Custom VM Options .
-Xms256m -Xmx8192m -XX:ReservedCodeCacheSize=2048m -XX:+UseCompressedOops -XX:MaxPermSize=4096m
Delete all .idea directories and re-import the project
Close Android Studio and in the project directory and delete all the .idea folders. On macOS or Linux, which can be executed using the find .
find . -name .idea -type d -exec rm -rf {} +
Then launch Android Studio and re-import the project.
Switch to CMake
Support for Android Studio NDK is based on CLion, which uses CMake as the project file format. I found that switching my large project to pure CMake put an end to the Building Symbols problem. This makes sense, as it is probably more thoroughly tested by JetBrains and easier to maintain than Android.mk projects.
Cameron Lowell Palmer
source share