我的应用程序适用于 Google Apis 17。我想在启动模拟器后设置 gps 位置。
我试着按照 how-to-emulate-gps-location-in-the-android-emulator .
第一。获取模拟器的序列号。
>adb devices
emulator-5554
第二轮
adb -s emulator-5554 emu geo fix 121.4961236714487 31.24010934431376
没有警告和错误。我在 windows7 上编程。
没用。但是,当我在 eclipse(ADT22.6) 中手动发送 gps 信息时,它可以工作。我的应用程序可以正确定位位置。 eclipse 做了什么?如何使 adb 命令起作用?谢谢
最佳答案
您是否尝试过通过 telnet 发送它?首先你必须连接到模拟器:
telnet localhost 5554
然后就可以使用geo命令来发送纬度和经度了:
geo fix 121.4961236714487 31.24010934431376
关于android - adb -s emu geo fix 在不使用 telnet 的情况下无法工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23339110/