On Thu, Jul 7, 2011 at 12:45 PM, Raghav Sood <raghavs...@gmail.com> wrote:

> Double latitude = location.getLatitude()*1E6;
>
>
> It is a NullPointerException so I suppose it is returning null.
>

NullPointerExceptions are cause by *objects* that are set to null. The only
*object* in that statement is "location". Thus, that's what is null.

You can verify this by using your debugger and breaking at that line.

I'd recommend you brush up on Java and the different between Object types
and Value types to understand the differences between the two.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to