Google Map returning nullpointerexception Google Maps Android V2

前端 未结 3 1737
谎友^
谎友^ 2020-12-06 22:36

I have a google map in a fragment in my application. Funny thing is that the map loads, but the logcat displays a NullPointerException

3条回答
  •  佛祖请我去吃肉
    2020-12-06 22:57

    MainActivity.xml :

        
    

    MainActivity.java :

    Private GoogleMap GoogleMap;
    googleMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
    

    Here's the permission:

    
    

    And here's the metadata section:

    ...
    
    
    

提交回复
热议问题