Android Studio 2.x - Building Symbols… Forever

前端 未结 2 2012
臣服心动
臣服心动 2021-02-06 00:52

I have problem with Android Studio. After updating AS to 2.2 it takes a long (~30 min) time to process indicating that it is \"Building Symbols...\" The project is reasonably la

2条回答
  •  不思量自难忘°
    2021-02-06 01:08

    Try changing the VM options?

    It is possible your VM is running out memory or you're under memory pressure. You can try increasing the amount of memory available to Android Studio under Help you can choose Edit Custom VM Options.

    -Xms256m
    -Xmx8192m
    -XX:ReservedCodeCacheSize=2048m
    -XX:+UseCompressedOops
    -XX:MaxPermSize=4096m
    

    Delete all the .idea directories and re-import the project

    Close Android Studio and in the project directory and delete all .idea folders. On macOS or Linux that might be accomplished with the find command.

    find . -name .idea -type d -exec rm -rf {} +
    

    Then launch Android Studio and re-import the project.

    Switch to CMake

    Android Studio's NDK support is based upon CLion which uses CMake as its project file format. I found that switching my large project to pure CMake put a permanent end to the Building Symbols problem. It makes sense, since it is probably more thoroughly tested by JetBrains and easier to support than Android.mk projects.

提交回复
热议问题