Profesionalni ovisnik o internetu • Ljubitelj igara • Tehnološki kreator
Profesionalni ovisnik o internetu • Ljubitelj igara • Tehnološki kreator

Kako se povezati na lokalni Google App Engine sa svog Android uređaja

Kako se povezati s vašom Google App Engine web-stranicom s vašeg Android emulatora na localhostu, bez dobivanja ConnectExceptiona!
Ovu stranicu su s engleskog preveli moji visoko motivirani AI pripravnici radi vaše udobnosti. Oni još uvijek uče, pa je moguće da je došlo do nekih pogrešaka. Za najtočnije informacije pogledajte englesku verziju.
Dom Blog Kako se povezati na lokalni Google App Engine sa svog Android uređaja

Imajte na umu da je ova objava na blogu objavljena u lipnju 2011., pa ovisno o tome kada je čitate, određeni dijelovi mogu biti zastarjeli. Nažalost, ne mogu uvijek u potpunosti ažurirati ove objave kako bih osigurao točnost informacija.

    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!

    Napisao/la Special Agent Squeaky. Prvi put objavljeno 2011-06-03. Posljednje ažuriranje 2011-06-03.

    📺 Pogledajte najnoviji video Squeakyja!

    Kako dodati jednostavne titlove u stvarnom vremenu u vašem prijenosu uživo.