Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)"
like image 713
Anuj Jindal Avatar asked Apr 19 '26 22:04

Anuj Jindal


1 Answers

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.

like image 64
Ankit Aggarwal Avatar answered Apr 24 '26 11:04

Ankit Aggarwal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!