Home Features Docs Blog Support GitHub

How to initilize getMapView() method of GMSMapView

hi,

I have got the following exception when i’m running my project:

java.lang.NullPointerException: Attempt to invoke virtual method ‘void org.moe.googlemaps.GMSMapView.animateToCameraPosition(org.moe.googlemaps.GMSCameraPosition)’ on a null object reference
at org.ui.AppViewController.viewDidLoad(AppViewController.java:144)
at apple.uikit.c.UIKit.UIApplicationMain(Native Method)
at org.Main.main(Main.java:20)

java code as follow:

getMapView().animateToCameraPosition(camera);

** could You please tell me how to initilize getMapView() at my AppViewController

thanks
Houssamel-din