java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference

  1. 0

    CameraUpdateFactory.newLatLngZoom returns null

    Stack Overflow | 4 months ago | christian surban
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference
  2. 0

    Java.lang.NullPointerException: moveCamera(cameraUpdate) on null object reference

    Stack Overflow | 1 week ago | umang dobariya
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference
  3. 0

    The Map I have, has polygon overlays, it centers to a location, event listeners do not trigger, and has other ti.map functions that do not get called. Running the App with Ti SDK 5.2.0.GA, The App compiles and runs, the Map loads, however does not center to the specified location, it simply defaults to the World view. Zooming in manually to the Polygons that have been placed, shows no polygons. It's as if the Map only loads, but nothing else can be done with it. Running the same code, with Ti SDK 5.1.2.GA, everything works normally and well, it's when we use Ti SDK 5.2.0.GA that causes the issues. Calling a method to center the map (for example with Ti.SDK 5.2.0.GA, as with other calls), crashes, here is the console when that happens: {code:java} [ERROR] TiApplication: (main) [703569,708944] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap .moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference; Titanium 5.2.0,2016/02/20 08:05,384775e [ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null obj ect reference [ERROR] TiApplication: at ti.map.TiUIMapView.moveCamera(TiUIMapView.java:395) [ERROR] TiApplication: at ti.map.TiUIMapView.updateCamera(TiUIMapView.java:388) [ERROR] TiApplication: at ti.map.TiUIMapView.propertyChanged(TiUIMapView.java:262) [ERROR] TiApplication: at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21) [ERROR] TiApplication: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1093) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] TiApplication: at ti.map.ViewProxy.handleMessage(ViewProxy.java:248) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:135) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5221) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) {code}

    Appcelerator JIRA | 9 months ago | Joseph Sachs
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null obj ect reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The Map I have, has polygon overlays, it centers to a location, event listeners do not trigger, and has other ti.map functions that do not get called. Running the App with Ti SDK 5.2.0.GA, The App compiles and runs, the Map loads, however does not center to the specified location, it simply defaults to the World view. Zooming in manually to the Polygons that have been placed, shows no polygons. It's as if the Map only loads, but nothing else can be done with it. Running the same code, with Ti SDK 5.1.2.GA, everything works normally and well, it's when we use Ti SDK 5.2.0.GA that causes the issues. Calling a method to center the map (for example with Ti.SDK 5.2.0.GA, as with other calls), crashes, here is the console when that happens: {code:java} [ERROR] TiApplication: (main) [703569,708944] Sending event: exception on thread: main msg:java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap .moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference; Titanium 5.2.0,2016/02/20 08:05,384775e [ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null obj ect reference [ERROR] TiApplication: at ti.map.TiUIMapView.moveCamera(TiUIMapView.java:395) [ERROR] TiApplication: at ti.map.TiUIMapView.updateCamera(TiUIMapView.java:388) [ERROR] TiApplication: at ti.map.TiUIMapView.propertyChanged(TiUIMapView.java:262) [ERROR] TiApplication: at org.appcelerator.kroll.KrollPropertyChange.fireEvent(KrollPropertyChange.java:21) [ERROR] TiApplication: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1093) [ERROR] TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:356) [ERROR] TiApplication: at ti.map.ViewProxy.handleMessage(ViewProxy.java:248) [ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] TiApplication: at android.os.Looper.loop(Looper.java:135) [ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5221) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) [ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) {code}

    Appcelerator JIRA | 9 months ago | Joseph Sachs
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null obj ect reference
  6. 0

    Google Map returning nullpointerexception Google Maps Android V2

    Stack Overflow | 2 years ago | Javed Ali
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.animateCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.moveCamera(com.google.android.gms.maps.CameraUpdate)' on a null object reference

      at com.hci_thesis.thesis_dolph.MainActivity.onDirectionFinderSuccess()
    2. com.hci_thesis.thesis_dolph
      MainActivity.onDirectionFinderSuccess
      1. com.hci_thesis.thesis_dolph.MainActivity.onDirectionFinderSuccess(MainActivity.java:269)
      1 frame
    3. mods
      DirectionFinder$DownloadRawData.onPostExecute
      1. mods.DirectionFinder.parseJSon(DirectionFinder.java:129)
      2. mods.DirectionFinder.access$100(DirectionFinder.java:25)
      3. mods.DirectionFinder$DownloadRawData.onPostExecute(DirectionFinder.java:87)
      4. mods.DirectionFinder$DownloadRawData.onPostExecute(DirectionFinder.java:58)
      4 frames
    4. Android Platform
      ActivityThread.main
      1. android.os.AsyncTask.finish(AsyncTask.java:632)
      2. android.os.AsyncTask.access$600(AsyncTask.java:177)
      3. android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
      4. android.os.Handler.dispatchMessage(Handler.java:102)
      5. android.os.Looper.loop(Looper.java:135)
      6. android.app.ActivityThread.main(ActivityThread.java:5221)
      6 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
      2 frames