模拟器的位置模拟不起作用 [英] Emulator's Location simulation not working

查看:843
本文介绍了模拟器的位置模拟不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的应用程序的最低API级别从5.0(Lollipop)降低到4.4(KitKat)



很遗憾,我无法获得任何真实设备,因此我必须使用模拟器。 我的应用是严重依赖于用户的位置,因此主要测试必须针对位置更改功能。 我尝试使用位置模拟官方的Google Android模拟器。 (x86)

我制作了一个 4.4模拟器并且工作正常,我的应用程序正常工作但当我尝试通过扩展控制面板发送位置时,不会发生任何事情。 如果我<加载GPX文件位置出现在GPS数据播放内部的扩展控制面板的表格中,但是设备没有得到任何位置。 b
$ b



我填入经纬度点击发送,但没有任何反应。



我也尝试模拟从 Android设备监视器的模拟器控制选项卡



发送按钮根本不可点击,长和长字段被禁用,我无法填写任何内容。 GPX和KML标签也被禁用。





我也尝试使用Gps Emulator插件,如下所示:





重新启动模拟器并检查确实使用的是扩展控件窗口的帮助/关于屏幕中的最新版本。



p>

I would like to lower the minimum API level of my application to 4.4(KitKat) from 5.0(Lollipop)

Sadly I couldn't get any real devices so I have to work with an emulator.

My app is heavily based on user's location so the main testing must be target the location changing feature.

I try to use location simulation with the official Google Android Emulator. (x86)

I have made a 4.4 Emulator and is working fine, my app works fine but when I try to send locations via the Extended control panel nothing happens.

If I load a GPX file the locations appear on the table of the extended control panel inside the GPS data playback but the device does not get any locations.

I fill the lat and longitude click on "SEND" but nothing happens.

I have also tried to simulate location changing from the Android Device Monitor's "Emulator Control" tab

The "Send" button is not clickable at all, the long and lat fields are disabled and I cannot fill anything. The "GPX" and "KML" tabs are also disabled.

I have also tried to use the Gps Emulator plugin as the following:

The progress bar do increases, so not like the first 2 methods I have tried this is finally looks like actually doing something but the emulator still not getting the location changes. Not at all.

I have tried a fourth method via command line:

telnet localhost 5554

But I have Connection refused error message.

So I cannot try to send locations via:

geo fix <longitude value> <latitude value>

(Telnes is enabled on my Windows)

解决方案

I had the same problem with the SDK Tools version 25.1.7. I've updated them to 25.2 rc1 and it now works.

Beware that you cannot install the RC version from Android Studio. You have to launch the separate Android SDK Manager to see it.

Relaunch the emulator and check that you are indeed using the latest version in the Help/About screen of the Extended Controls windows.

这篇关于模拟器的位置模拟不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆