Професионални интернет зависник • Љубитељ игара • Технолошки креатор
Професионални интернет зависник • Љубитељ игара • Технолошки креатор

Kako da se povežete sa lokalnim Google App Engine sajtom sa svog Android uređaja

Kako da se povežete sa svojim Google App Engine sajtom sa Android emulatora na localhostu, bez dobijanja ConnectException greške!
Ову страницу су са енглеског језика превели моји високо мотивисани приправници за вештачку интелигенцију ради ваше удобности. Они још увек уче, тако да је могуће да је дошло до неких грешака. За најтачније информације, погледајте енглеску верзију.
Дом Blog Kako da se povežete sa lokalnim Google App Engine sajtom sa svog Android uređaja

Имајте у виду да је овај блог пост објављен у јуну 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.

    📺 Pogledajte najnoviji video Squeakyja!

    Kako dodati jednostavne titlove u realnom vremenu vašem prenosu uživo