运行时错误 - java.lang.IllegalArgumentException异常:供应商= GPS [英] Runtime Error--java.lang.IllegalArgumentException: provider=gps
本文介绍了运行时错误 - java.lang.IllegalArgumentException异常:供应商= GPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到了一个Android应用程序,我创建从用户登录这个错误。我一直无法复制的错误迄今。任何帮助将是非常美联社preciated,因为我一直在敲打我的头靠在墙上几个小时。
该错误是:
java.lang.IllegalArgumentException异常:供应商= GPS
在android.os.Parcel.readException(Parcel.java:1326)
在android.os.Parcel.readException(Parcel.java:1276)
在android.location.ILocationManager $存根$ Proxy.requestLocationUpdates(ILocationManager.java:646)
在android.location.LocationManager._requestLocationUpdates(LocationManager.java:582)
在android.location.LocationManager.requestLocationUpdates(LocationManager.java:446)
在com.myApp.service.DeviceManager $ 7.handleMessage(DeviceManager.java:470)
在android.os.Handler.dispatchMessage(Handler.java:99)
在android.os.Looper.loop(Looper.java:130)
在android.app.ActivityThread.main(ActivityThread.java:3835)
在java.lang.reflect.Method.invokeNative(本机方法)
在java.lang.reflect.Method.invoke(Method.java:507)
在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:883)
在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
在dalvik.system.NativeStart.main(本机方法)
它指的是devicemanager位置是:
私人最终处理程序uihandler =新的处理程序(){ @覆盖
公共无效的handleMessage(消息MSG){
开关(msg.what){
案例MSG_TOAST:
Toast.makeText(DeviceManager.this,msg.arg1,Toast.LENGTH_SHORT).show();
打破; 案例MSG_ENABLE_LOCATION:
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,60000,1,DeviceManager.this);
mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
60000,1,DeviceManager.this);
打破; 案例MSG_DISABLE_LOCATION:
mLocationManager.removeUpdates(DeviceManager.this);
打破; 案例MSG_STOP_SELF:
打破;
}
} };
解决方案
对不起忘了发布的解决方案。这个问题最终是由于用户强制关闭应用程序在一个位置更新的中间。我们无能为力这种事的!
I got this error from the user logs on an android app I created. I have been unable to replicate the error thus far. Any help would be extremely appreciated since I've been banging my head against the wall for hours.
The error is:
java.lang.IllegalArgumentException: provider=gps
at android.os.Parcel.readException(Parcel.java:1326)
at android.os.Parcel.readException(Parcel.java:1276)
at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:646)
at android.location.LocationManager._requestLocationUpdates(LocationManager.java:582)
at android.location.LocationManager.requestLocationUpdates(LocationManager.java:446)
at com.myApp.service.DeviceManager$7.handleMessage(DeviceManager.java:470)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:883)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
at dalvik.system.NativeStart.main(Native Method)
The devicemanager location it refers to is:
private final Handler uihandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case MSG_TOAST:
Toast.makeText(DeviceManager.this, msg.arg1, Toast.LENGTH_SHORT).show();
break;
case MSG_ENABLE_LOCATION:
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 60000, 1,DeviceManager.this);
mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,
60000, 1, DeviceManager.this);
break;
case MSG_DISABLE_LOCATION:
mLocationManager.removeUpdates(DeviceManager.this);
break;
case MSG_STOP_SELF:
break;
}
}
};
解决方案
Sorry forgot to post the solution. The problem ended up being due to a user force closing the app in the middle of a location update. Nothing we can do about that!
这篇关于运行时错误 - java.lang.IllegalArgumentException异常:供应商= GPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文