LatLng对象在Android中显示为null,googlemaps。我的locationUpdateLatLng
值为null
My Utils课程:
public static LatLng getLatLng(){
return latLng;
}
MyActivity类:
LatLng locationUpdateLatLng;
locationUpdateLatLng = Utils.getLatLng();
当我致电locationUpdateLatLng = Utils.getLatLng()
时,这给我的值为null。NullpointerException
答案 0 :(得分:0)
是的,直到你实现代码的其他neccessasry部分它才会起作用。看看这个官方文档,非常有用的一个: https://developers.google.com/maps/documentation/android-api/current-place-tutorial