从 Android Studio 调试运行应用程序变得很慢

Gon*_*nki 8 debugging performance android adb android-studio

最近几天,在调试模式下运行应用程序明显变慢。有几篇关于调试性能缓慢的文章,但没有明确解释如何解决该问题。该项目没有任何断点。

Android Studio 2.2.1:缓慢调试 android studio 调试器非常慢 Android Studio 在设备上调试缓慢

上传到 PlayStore 的签名 .aab 文件可以正常工作。此外,使用“bundletool”将签名的 .aab 转换为 .apks 可以按预期工作。未签名的 .apk 不起作用。

该问题与物理设备和虚拟设备都有关。

我的同事也观察到类似的行为。

该问题于几天前在 Giraffe 2022.3.1 中开始出现,并在 2023.2.1 中没有得到解决。

2023.2.1 Canary 11 Gradle 插件:8.3.0-alpha11 Gradle:8.4-rc-2 Java:VERSION_1_8

Gon*_*nki -1

当以下内容添加到模块 build.gradle 时,它​​会按预期工作

buildTypes {
    debug {
        debuggable false
    }
}
Run Code Online (Sandbox Code Playgroud)