android - setLatitude setLongitude NullPointer exception -
i have location:
public location temp;
now want remember coordinates on map, this:
double = 40.156729, b = 44.47197;
temp.setlatitude(40.156729); temp.setlongitude(44.47197); this throws nullpointerexception. tried in way:
double = 40.156729, b = 44.47197; temp.setlatitude(a); temp.setlongitude(b); but still same.
logcat:
06-05 09:32:55.720: e/androidruntime(1370): caused by: java.lang.nullpointerexception thanks.
have yout initialized location object? instance:
location temp = new location(locationmanager.network_provider);
Comments
Post a Comment