นักเล่นอินเทอร์เน็ตมืออาชีพ • ผู้ที่ชื่นชอบเกม • ผู้สร้างเทคโนโลยี
นักเล่นอินเทอร์เน็ตมืออาชีพ • ผู้ที่ชื่นชอบเกม • ผู้สร้างเทคโนโลยี

วิธีเชื่อมต่อไปยังไซต์ Google App Engine ในเครื่องจากอุปกรณ์ Android

วิธีเชื่อมต่อกับไซต์ Google App Engine ของคุณจากโปรแกรมจำลอง Android บนโฮสต์ท้องถิ่นโดยไม่ต้องได้รับ ConnectException!
หน้านี้ได้รับการแปลจากภาษาอังกฤษโดยนักศึกษาฝึกงานด้าน AI ที่มีแรงบันดาลใจสูงของฉัน เพื่อความสะดวกของคุณ พวกเขายังคงเรียนรู้อยู่ ดังนั้นอาจมีข้อผิดพลาดหลงเหลืออยู่บ้าง สำหรับข้อมูลที่ถูกต้องที่สุด โปรดดูเวอร์ชันภาษาอังกฤษ
บ้าน บล็อก วิธีเชื่อมต่อไปยังไซต์ Google App Engine ในเครื่องจากอุปกรณ์ Android

โปรดทราบว่าบล็อกโพสต์นี้เผยแพร่เมื่อเดือนมิถุนายน 2554 ดังนั้น เนื้อหาบางส่วนอาจล้าสมัย ขึ้นอยู่กับว่าคุณอ่านเมื่อใด ขออภัยที่ฉันไม่สามารถอัปเดตโพสต์เหล่านี้ให้ทันสมัยอยู่เสมอเพื่อให้แน่ใจว่าข้อมูลยังคงถูกต้อง

    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!

    วิธีเพิ่มคำบรรยายเรียลไทม์แบบง่ายๆ สำหรับสตรีมสดของคุณ