尝试在Android Studio中调试注释处理器最终会出现异常 [英] Trying to debug Annotation Processor in android studio end up getting exception

查看:122
本文介绍了尝试在Android Studio中调试注释处理器最终会出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Android Studio 3.1.3

Using Android Studio 3.1.3

等级3.1.2

具有5005端口的默认配置的Runnung Remote构建

Runnung Remote build with default config with 5005 port

在gradle.properties文件中

in gradle.properties file

org.gradle.daemon = false org.gradle.jvmargs = -agentlib:jdwp = transport = dt_socket,server = y,suspend = n,address = 5005

org.gradle.daemon=false org.gradle.jvmargs= -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005

总是出错:

Error running 'APT': Unable to open debugger port (127.0.0.0:5005): java.net.ConnectException "Operation timed out (Connection timed out)"

推荐答案

我是如何工作的-

步骤1 在终端中运行以下命令

Step 1 Run the below command in the terminal

./gradlew --no-daemon -Dorg.gradle.debug=true :app:clean :app:compileDebugJavaWithJavac

步骤2 Go to run-> Edit Configurations-> '+'-> Remote->为此配置命名,并确保端口号是5005-> OK.

Step 2 Go to run -> Edit Configurations -> '+' in the top left corner -> Remote -> Give a name to this configuration, and ensure that the port number is 5005 -> OK.

步骤3 从下拉式&调试.

Step 3 Select your configuration from the drop-down & debug.

这篇关于尝试在Android Studio中调试注释处理器最终会出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆