प्रोफेशनल इंटरनेट एडिक्ट • गेम उत्साही • टेक क्रिएटर
प्रोफेशनल इंटरनेट एडिक्ट • गेम उत्साही • टेक क्रिएटर

अपने Android डिवाइस से लोकल Google App Engine साइट से कैसे कनेक्ट करें

Android एमुलेटर से localhost पर अपने Google App Engine साइट से बिना ConnectException के कैसे कनेक्ट करें!
आपकी सुविधा के लिए इस पृष्ठ का अनुवाद मेरे अति-उत्साही एआई इंटर्न द्वारा अंग्रेजी से किया गया है। वे अभी भी सीख रहे हैं, इसलिए हो सकता है कि कुछ गलतियाँ रह गई हों। सबसे सटीक जानकारी के लिए, कृपया अंग्रेजी संस्करण देखें।
घर ब्लॉग अपने Android डिवाइस से लोकल Google App Engine साइट से कैसे कनेक्ट करें

यह ब्लॉग जून 2011 का है, इसलिए कुछ जानकारी अब पुरानी हो सकती है।

    If you are trying, from your Android application through the Android emulator, to access an external service on the same computer (such as your own Google App Engine site) by using the host name localhost or the IP-address 127.0.0.1, you might get a java.net.ConnectException java.net.ConnectException: localhost/127.0.0.1:8888 - Connection refused error - even though you can perfectly well access the service outside the Android application.
    The reason why a ConnectException occurs is because "localhost" or "127.0.0.1" inside the Android emulator is the emulator's own loopback interface, meaning all request sent to the destination will be looped backed to the emulator and won't actually be sent to your local machine.
    To by pass this, simply replace "localhost" with the IP-address "10.0.2.2", as this is a special address towards the real local host.
    Done!

    Special Agent Squeaky द्वारा लिखा गया। पहली बार प्रकाशित: 2011-06-03। अंतिम अपडेट: 2011-06-03।

    📺 Squeaky का नवीनतम वीडियो देखें!

    अपने लाइव स्ट्रीम पर सरल वास्तविक-समय उपशीर्षक कैसे जोड़ें