简体   繁体   English

无法获得Android模拟器的地理位置修复

[英]Can't get geo fixes to Android emulator

I'm trying to send geo fixes to the Android Emulator in Eclipse. 我正在尝试将地理修复程序发送到Eclipse中的Android仿真器。 It has been working in some locations, but now it never works. 它已在某些位置工作,但现在永远无法工作。 I've tried targeting different platforms, setting the time zone in the correct emulator, changing the locale to English (US), wiping the user data in the emulator, used both telnet geo fix command and the DDMS. 我尝试使用不同的平台,在正确的仿真器中设置时区,将语言环境更改为英语(美国),在仿真器中擦除用户数据,同时使用telnet geo fix命令和DDMS。

How can I make this work? 我怎样才能做到这一点?

If your AVD version is API level 9, (2.3 emulator), then it appears to be a known bug 如果您的AVD版本是API级别9(2.3模拟器),则它似乎是一个已知的错误

onLocationChanged(Location location) method does not work in google API 9 platfom 2.3 onLocationChanged(位置位置)方法在Google API 9 platfom 2.3中不起作用

I've got two apps that work fine in 2.1 and 3.0, but one is reluctant to install under 2.3, when it does, geo fix doesn't work.. The other is installed and again geo fix doesn't work. 我有两个可以在2.1和3.0中正常工作的应用程序,但是一个不愿意在2.3下安装,当它安装时,geofix无法正常工作。另一个已安装,而geofix则无法正常工作。

Make sure your emulator's name is selected under Devices in DDMS. 确保在DDMS中的“设备”下选择了仿真器的名称。 And also occasionally ADB fails so the commands don't get sent to the emulator so you have to restart the dev environmeneclipse and adb. 而且有时ADB失败,因此命令不会发送到仿真器,因此您必须重新启动dev environmeneclipse和adb。

I had this very problem in the Java bootcamp I was teaching last week. 上周我在Java训练营中遇到了这个问题。 This is a known bug in API level 9. 这是API级别9中的一个已知错误。

Your best bet is to connect a device and test on an actual device. 最好的选择是连接设备并在实际设备上进行测试。 Once we did that we could see on the map the actual building we were in at the time! 完成操作后,我们便可以在地图上看到当时的实际建筑物!

I also recommend testing on the device for camera applications as the interface to test camera apps on the emulator is clunky.. 我还建议在设备上针对相机应用程序进行测试,因为在模拟器上测试相机应用程序的界面比较笨拙。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM