Trying to debug Annotation Processor in android studio end up getting exception

烈酒焚心 提交于 2019-12-07 23:20:44

问题


Using Android Studio 3.1.3

gradle 3.1.2

Runnung Remote build with default config with 5005 port

and

in gradle.properties file

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

always getting error:

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

回答1:


How I made it work -

Step 1 Run the below command in the terminal

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

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.

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



来源:https://stackoverflow.com/questions/50929242/trying-to-debug-annotation-processor-in-android-studio-end-up-getting-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!