🤖 How to fix an android emulator which does not connect to internet?

Why?

Sometimes, the Android emulator does not connect to internet, this might happen if there is a custom DNS server on the network.
This has become a classical emulator issue, but there is no simple way to quickly fix it other than using the emulator’s UI to set static local IP address along with a new DNS inside the network settings.

How?

A quick fix is to run the emulator with a custom DNS using command line. This might not be the best long-term fix, but it might come handy in some situations.

# Get a list of android emulators on your device
emulator -list-avds

# Run an emulator with DNS set to 8.8.8.8 (Google)
emulator -avd Pixel_2_API_30 -dns-server 8.8.8.8

This will open the emulator with DNS already set to “8.8.8.8”.

Kotlin, die zweite offizielle Programmiersprache für Android

Kotlin wurde in Android von Android Developers inoffiziell mit Bibliotheken wie ANKO verwendet. Gestern wurde Kotlin als zweite offiziell unterstützte Android-Programmiersprache in Google I / O eingeführt.

Hier sind einige Links und Ressourcen zu Präsentationen und Tools, die ich für den Einstieg in Kotlin für Android nützlich fand.

Hier ist eine Einführung von Wojtek Kaliciński, die Ihnen eine bessere Perspektive über die Verwendung von Kotlin in Android Studio 3.0 bietet:
Android Tool Time: Getting Started with Kotlin


Ich habe auch diese Präsentation von Hadi Hariri im CERN eine gute Quelle gefunden, um mit Kotlin in ca. 45 Minuten aufzustehen, ich ermutige Sie wirklich, es zu sehen.
Kotlin – Ready for production by Hadi Hariri


Und schließlich laden Sie die neue Version von Android Studio 3.0 Canary aus der offiziellen Vorschau-Website herunter.
Android Studio Preview Download


Ich hoffe, diese Ressourcen helfen Jumpstart Ihre nächste Android-Projekt mit Kotlin und verbessern Sie Ihre Produktivität in Android Development.