位置返回null(Android)

时间:2016-08-04 20:27:24

标签: java android

在我的onMapReady()函数中,我试图调用这样的方法:

onLocationChanged(getLastKnownLocation());

但是,如果我启动Activity,它会崩溃,如果我在我的控制台中查看getLastKnownLocation()中作为参数给出的位置,则返回null。

有没有经验可以帮助我的人?​​

这是我的全班:( PechhulpActivity.java) https://gist.github.com/soufyanekaddouri/c32d52fbb625800c4e40dc72c2cac55e

0 个答案:

没有答案
相关问题