嗨,我正在尝试从 UI 线程以外的线程请求位置更新,我在以下行中得到了 RuntimeExeption:
// request location updates using Cellular
lm.requestLocationUpdates(
LocationManager.NETWORK_PROVIDER,
0,
0,
locationListener);
然后阅读它说它抛出的文档:
IllegalArgumentException if provider is null or doesn't exist on this device
IllegalArgumentException if listener is null
RuntimeException if the calling thread has no Looper
SecurityException if no suitable permission is present
所以似乎我的线程没有 Looper,但问题是我不知道“Looper”是什么意思。提前致谢!