使用Android Studio 3.1.3
等级3.1.2
使用 5005 端口使用默认配置运行远程构建
and
在 gradle.properties 文件中
org.gradle.daemon=false
org.gradle.jvmargs= -agentlib:jdwp=transport=dt_socket,服务器=y,挂起=n,地址=5005
总是出现错误:
Error running 'APT': Unable to open debugger port (127.0.0.0:5005): java.net.ConnectException "Operation timed out (Connection timed out)"
我是如何让它发挥作用的-
Step 1在终端中运行以下命令
./gradlew --no-daemon -Dorg.gradle.debug=true :app:clean :app:compileDebugJavaWithJavac
Step 2 Go to run
-> Edit Configurations
-> '+'
在左上角 ->Remote
-> 为该配置命名,并确保端口号为5005 ->OK
.
Step 3从下拉菜单中选择您的配置并进行调试。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)