Google Maps Fragment returning null inside a fragment

前端 未结 8 919
花落未央
花落未央 2020-11-27 18:05

So I have an empty fragment that contains a map fragment. Whenever I try to activate the fragment containing the map, my app crashes and returns a null pointer error on this

8条回答
  •  星月不相逢
    2020-11-27 18:33

    The problem may be related to the fact that your targetSdkVersion is higher than the version of Android Support Library used.

    That was my case, in one of the projects we've been working on targetSdkVersion was 21, while Support Library version was 19.0.0. Changing targetSdkVersion to 19 fixed the problem.

提交回复
热议问题