Android Studio-调试缓慢,有时会卡在“等待调试器”中,SIGSEGV崩溃 [英] Android Studio - Slow debug, sometimes stuck on "Waiting for debugger", SIGSEGV crashes
问题描述
这可能是一个过于笼统的问题,但是这个问题使我发疯,我希望得到一些帮助:
似乎每个新的Android Studio版本,调试都变得越来越不可能。我遇到以下问题:
- 总体上调试速度很慢。
- 调试器连接尝试失败的可能性很高,设备挂在等待调试器上。
- SIGSEGV 崩溃,调试器将在随机位置(通常在启动后立即停止)在SIGSEGV上停止,但是我可以单击 play 按钮并继续调试。
- 调试器断开连接。
这种情况在真实设备和仿真器上均会发生,并具有多种设置和Android API级别
我的设备非常强大:Win 10,I7-4810MQ,16g mem,SSD。当前的AS版本为2.3.3。
有人能帮助我从这个烂摊子中走出来吗?
事实证明,罪魁祸首是我使用JDK 8(1.8.0_45)。我猜想当Google
现在我必须处理应用程序中的实际错误,但这是一个完全不同的故事...
This may come out as too broad a question, but this issue(s) is driving me nuts and I'd appreciate some help:
It seems that with each new Android Studio version, debugging gets more and more impossible. I'm experiencing the following issues:
- Very slow debugging overall. Stepping over is a drag.
- A high precentage of failed debugger connection attempts, where the device is hanging on "Waiting for debugger".
- SIGSEGV "crashes", where the debugger would halt on a SIGSEGV on a random place (ususally right after launch) but I'd be able to click the play button and continue debugging.
- Debugger disconnections.
This happens both on real devices and emulators, with a wide range of setups and Android API levels.
My rig is quite powerful: Win 10, I7-4810MQ, 16g mem, SSD. Current AS version is 2.3.3.
Can anyone help me make some sense out of this mess?
It turns out the culprit was me using JDK 8 (1.8.0_45). I guess the situation did indeed begin deteriorating with Android Studio 2.2, when Google made the switch to OpenJDK.
The fix was to simply let Android Studio use its own JRE, which is based on the OpenJDK project.
In File -> Project structure -> SDK location, I had to tick Use embedded JDK:
Now I have to deal with the actual bugs in my app, but this is a whole different story...
这篇关于Android Studio-调试缓慢,有时会卡在“等待调试器”中,SIGSEGV崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!