简体   繁体   English

如何使用Android模拟器查找GPS位置?

[英]how to find the gps location using android emulator?

你好朋友,我正在尝试找到我使用命令地理修复程序的android模拟器的当前gps位置,但是如果我尝试检索当前位置,它将显示异常...有人可以帮助我吗?

From imulator you can't get current location. 从模拟器无法获取当前位置。 you have to paas location yourself.try this 您必须自己定位位置。试试这个

C:/android sdk/tools/ddms.bat C:/ android sdk / tools / ddms.bat

when u run this bat file u will find an emulator tab there. 当您运行此bat文件时,会在此处找到仿真器选项卡。 from this tab you can pass locations to imulator. 在此选项卡中,您可以将位置传递给模拟器。

Go here: 到这里:

http://developer.android.com/guide/topics/location/obtaining-user-location.html http://developer.android.com/guide/topics/location/obtaining-user-location.html

Scroll down to the Providing Mock Location Data 向下滚动到提供模拟位置数据

Google's tutorials can be hard to understand, but they usually work great once you figure them out. Google的教程可能很难理解,但是一旦您弄清楚它们,它们通常会很好用。

I think you can't find your location with Android emulator. 我认为您无法使用Android模拟器找到您的位置。

But you can set your longitude and latitude manually. 但是您可以手动设置经度和纬度。 Using DDMS section in Eclipse better and easier way. Eclipse中使用DDMS部分更好,更轻松的方法。

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

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