android - adb -s emu geo fix 在不使用 telnet 的情况下无法工作

标签 android eclipse android-emulator gps adb

我的应用程序适用于 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/

相关文章:

android - 在已经存在 ListView 的滑动抽屉内实现 ListView

java - SharedPreferences 不能跨 Activity 工作

eclipse - Gradle-如何在Eclipse外下载飞船

c++ - 带有 CDT 的 Eclipse Juno 不添加内置包含目录

android - 只装饰 RecyclerView 的绝对第一项

java - Swing 应用程序窗口未显示更改

android-emulator - HTC Desire 的正确 Eclipse/Android 设备配置

Android emulator-5554 离线,2 个具有相同名称和 ID 的进程在不同的端口上运行?

android - VideoView-播放swf文件

android - 无法在 Eclipse 中启动 AVD 模拟器