title: Google places APi android parsing JSon
body: <p>sorry about my question but im an android beginner and im building an android application that gets user's location (longitude and latitude) and return places within 3 kms. in order to do this i have to send a request to google and parse the json object, i followed a tutorial and im now stuck! everytime i run the application the application crashes ( with an alert dialog saying application stopped) . </p>
  
  <p>here is a link to the tutorial that i was following :
  <a href="http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/" rel="nofollow">http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/</a></p>
  
  <p>here is the logcat:</p>
  
  <pre><code>12-02 14:06:53.201: I/dalvikvm(620): Wrote stack traces to '/data/anr/traces.txt'
  12-02 14:06:53.410: D/gralloc_goldfish(620): Emulator without GPU emulation detected.
  12-02 14:06:54.271: D/dalvikvm(620): GC_CONCURRENT freed 216K, 4% free 9260K/9607K, paused 5ms+3ms
  12-02 14:06:55.661: D/Restaurents Status(620): null
  12-02 14:06:55.661: D/AndroidRuntime(620): Shutting down VM
  12-02 14:06:55.661: W/dalvikvm(620): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
  12-02 14:06:55.671: E/AndroidRuntime(620): FATAL EXCEPTION: main
  12-02 14:06:55.671: E/AndroidRuntime(620): java.lang.NullPointerException
  12-02 14:06:55.671: E/AndroidRuntime(620):  at com.ah906632.kalabizo.MainActivity$FindRestaurents$1.run(MainActivity.java:120)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at android.app.Activity.runOnUiThread(Activity.java:4170)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at com.ah906632.kalabizo.MainActivity$FindRestaurents.onPostExecute(MainActivity.java:117)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at com.ah906632.kalabizo.MainActivity$FindRestaurents.onPostExecute(MainActivity.java:1)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at android.os.AsyncTask.finish(AsyncTask.java:602)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at android.os.AsyncTask.access$600(AsyncTask.java:156)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at android.os.Handler.dispatchMessage(Handler.java:99)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at android.os.Looper.loop(Looper.java:137)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at android.app.ActivityThread.main(ActivityThread.java:4424)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at java.lang.reflect.Method.invokeNative(Native Method)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at java.lang.reflect.Method.invoke(Method.java:511)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  12-02 14:06:55.671: E/AndroidRuntime(620):  at dalvik.system.NativeStart.main(Native Method)
  12-02 14:06:56.231: I/dalvikvm(620): threadid=3: reacting to signal 3
  12-02 14:06:56.241: I/dalvikvm(620): Wrote stack traces to '/data/anr/traces.txt'
  </code></pre>
  
  <p>thanks</p>