问题描述
我在 code.google.com 看到有在法getLocationUpdate()当我们尝试以下错误:
I saw on code.google.com that there is a bug in method getLocationUpdate() when we try the following:
requestLocationUpdates(LocationManager.NETWORK_PROVIDER,1000L,500.0f,这一点);
它抛出:
09-06 22:46:16.163: ERROR/AndroidRuntime(351): Caused by: java.lang.IllegalArgumentException: provider=network
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.os.Parcel.readException(Parcel.java:1325)
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.os.Parcel.readException(Parcel.java:1275)
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:646)
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.location.LocationManager._requestLocationUpdates(LocationManager.java:582)
09-06 22:46:16.163: ERROR/AndroidRuntime(351): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:446)
下面是链接:
我想知道的是这个固定yet.My应用程序崩溃它会尝试获取位置更新每次。
I want to know is this fixed yet.My app is crashing everytime it tries to get the location update.
推荐答案
请第一器具实施LocationListener的
如果您还没有写。
Please first implements implements LocationListener
if you have not written.
,否则
试试这个链接的我有解决我的问题与此链接。
试试这个...
祝您好运。
Try this link Get current Lat Lon i have solve my problem with this link.Try this one...Best of luck
和也尽量使用 LocationManager.GPS_PROVIDER
的 LocationManager.NETWORK_PROVIDER
istead。
And also try with using LocationManager.NETWORK_PROVIDER
istead of LocationManager.GPS_PROVIDER
.
这篇关于getLocationUpdates()上的4.0模拟器给予非法参数异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!