1 建立远程调试任务

image.png

image.png

image.png
2 在项目中的terminal命令行中
gradle assembleDebug -Dorg.gradle.daemon=false -Dorg.gradle.debug=true
assembleDebug 可以为其他的构建命令,但参数-Dorg.gradle.daemon=false -Dorg.gradle.debug=true
要有。

image.png
创建debug任务成功后

image.png
3.开始调试
打断点

image.png
开始调试

image.png

image.png