例外的LocationManager提供商QUOT; GPS和QUOT;未知 [英] LocationManager exception Provider "gps" unknown

查看:218
本文介绍了例外的LocationManager提供商QUOT; GPS和QUOT;未知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是关系到这里我自己的问题:
的LocationManager例外

This is related to my own question here: LocationManager exception

现在,我没有权限问题 - 同一条线上code的给了我异常:

Now that I have no permission issue - same line of code gives me exception:

Caused by: java.lang.IllegalArgumentException: Provider "gps" unknown
        at android.os.Parcel.readException(Parcel.java:1251)
        at android.os.Parcel.readException(Parcel.java:1235)
        at android.location.ILocationManager$Stub$Proxy.setTestProviderEnabled(ILocationManager.java:942)

编辑:
从我读 - 我需要使用Eclipse或DDMS。但是我用的IntelliJ
我如何用我的设置模拟地点?

From what I read - I need to use Eclipse or DDMS. But I use IntelliJ How do I mock locations using my setup?

推荐答案

似乎setTestProviderStatus德precated。谷歌搜索和搜索没有帮助。从书中的一些信息给我的线索,那些absolete。相反,需要模拟地点使用模拟器或设备在使用DDMS。于是,我试着走这条路,似乎是工作。

It seems that setTestProviderStatus deprecated. Googling and searching didn't help. Some information from book gave me clue that those absolete. Instead, need to mock locations using DDMS when using emulator or device. So, I tried go that route and it seems to be working.

这篇关于例外的LocationManager提供商QUOT; GPS和QUOT;未知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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