Android studio调试时不显示变量,且通过add to watches 添加的参数变量都显示Cannot find local variable。通过debug运行时提示

“build type is not debuggable”。

根据提示可知由于编译不是debug模式导致的。

首先查看build.gradle中是否对 debuggable 参数进行了配置。

我这里没有配置,所以打开右侧Build Variants发现由于之前编译release版本的apk,所以在此处将编译类型默认设置为了release

build type is not debuggable

将模式改为debug

相关文章:

  • 2022-12-23
  • 2021-04-11
  • 2021-10-19
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-08-11
猜你喜欢
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2022-01-12
  • 2021-09-14
相关资源
相似解决方案