Since the problem is related to the DNS used by the emulator (by default, it uses the same as your machine) the approach that I’ve taken is just to launch the emulator configured to connect to Google’s public DNS’ - 8.8.8.8. Choose 'Start a new Android Studio project' 'Phone and Tablet' 'Empty Activity' Next Set 'Name' to ' Hello Android XML ' 'Finish'. In Android Studio, open the Settings dialog (Preferences on macOS), then navigate to Appearance & Behavior > System Settings > Android SDK. The problem here seems to be related to the DNS picked by the Android emulator, which it cannot resolve and therefore connect to the internet. CLOSE the previous project, via 'File' 'Close Project' (Always CLOSE the previous project before starting a new project). This is usually followed by the typical turn off and on the WiFi on the emulator, then on the computer and then either wipe all the data and relaunch or just creating a new instance to see if it would magically work. This happens from time to time on the Android emulator that lives on my computer - I launch an instance to work on and it just decides that it doesn’t want to connect to the internet.
0 Comments
Leave a Reply. |