• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I solve error that I get with Google Maps?  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having problem with Google Maps. When I try to run it, I'm getting error at onInitilaize() method and onCreate(). This is my code:





And this is logcat:


 
Master Rancher
Posts: 2572
30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.MapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)' on a null object reference
               at com.example.lordofsummer.metalapp.MapActivity.initialize(MapActivity.java:93)


Looks like the problem is with a null being returned by findFragmentById 
Try Searching for findfragmentbyid returns null for many discussions of the problem
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!