Reputation: 563
Whenever I type any single letter, Android Studio tries to seek suggestion of methods and classes, and this freezes program. Even though I wait, it doesn't show any suggestions at the end whether I try to type proper method/class name or not.
I tried to check CPU usage first because whenever I try to type letters, CPU usage suddenly jumps up to about 90% from 0~10%. I took screenshot of Activity Monitor, and total CPU usage keeps exceeding 100 whenever I try to type single letter
Plugin Kotlin takes ridiculously high CPU usage only for trying to seek suggestions. There are about 300 classes including both Java and Kotlin classes.
I set IDE max heap size as 8GB because I have 16GB RAM
I'm using Android Studio 4.2 Beta 2 version
Invalidating/Restarting caches didn't work. Removing .idea
folder in Android project folder also didn't work.
Is there any reason for this problem? and can I solve this problem?
Upvotes: 3
Views: 1010
Reputation: 563
It turned out that some class was causing problem, this class is java with generics. T in generic requires to extend Enum and implement my other class, this seems to cause Android Studio freeze. I'm trying to find a way to reproduce, but solved it by creating static java method which handles my codes. Only Kotlin is causing freezings.
Upvotes: 1