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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -