Profesionāls interneta atkarīgais • Spēļu entuziasts • Tehnoloģiju radītājs
Profesionāls interneta atkarīgais • Spēļu entuziasts • Tehnoloģiju radītājs

Kā savienoties ar lokālo Google App Engine vietni no sava Android ierīces

Kā pieslēgties savam Google App Engine projektam no Android emulatora uz localhost bez ConnectException kļūdas!
Šo lapu no angļu valodas jūsu ērtībām ir tulkojuši mani augsti motivētie mākslīgā intelekta praktikanti. Viņi joprojām mācās, tāpēc dažas kļūdas varētu būt paslīdējušas garām. Lai iegūtu visprecīzāko informāciju, lūdzu, skatiet angļu valodas versiju.
Sākums Emuārs Kā savienoties ar lokālo Google App Engine vietni no sava Android ierīces

Šis raksts publicēts 2011. gada jūnijā, tāpēc, iespējams, daļa informācijas ir vecāka. Tomēr idejas joprojām derīgas!

    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!

    Autors Special Agent Squeaky. Pirmo reizi publicēts 2011-06-03. Pēdējo reizi atjaunināts 2011-06-03.

    📺 Skaties Squeaky jaunāko video!

    Kā pievienot vienkāršus reāllaika subtitrus jūsu tiešraidei.