Android debug database can't reach site

Viewed 925

I want to use the https://github.com/amitshekhariitbhu/Android-Debug-Database library.

According to the instructions I added to the build.gradle the implementation line com.amitshekhar.android:debug-db:1.0.6. Using the default emulator, I start debugging, logcat correctly displayed the message "DebugDB: Open http://10.0.2.16:8080 in your browser". In the console I entered adb forward tcp:8080 tcp:8080 attempt to enter the browser on a laptop on url http://localhost:8080 ends with "ERR_EMPTY_RESPONSE", even the attempt to enter the url http://10.0.2.16:8080 in the emulator browser looks the same.

What could be the problem? I'm using Windows 10.

1 Answers

I found the solution for my case. Just change the port as described in git [repo][1]:

Note : If you want use different port other than 8080. In the app build.gradle file under buildTypes do the following change

debug {
resValue("string", "PORT_NUMBER", "8081")
}

It worked for me. [1]: https://github.com/amitshekhariitbhu/Android-Debug-Database

Related