Closed nickwjmz closed 3 years ago
I tried going through the codelab using an emulator (the emulator in Android Studio) and it worked with the steps in the codelab. Perhaps this was another emulator that works differently?
In either case, since it seems to be working in the default configuration, I'm going to close this.
If you have further details, including an idea for how it might be presented so it works both in your setup, in addition to the currents steps in the codelab, I'd be happy to accept a PR.
localhost directs to 127.0.0.1 but to access emulator's localhost you need to use the special address 10.0.2.2 according to this page in the docs.
To get the app to show the posts on the emulator I changed the following:
Change the line in the
gradle.properties
to this instead.Finally, change the
xml/network_security_config.xml
file as follows: res/xml/network_security_config.xml