First launch of Activity with Google Maps is very slow

前端 未结 9 1787
礼貌的吻别
礼貌的吻别 2020-12-02 12:37

I want to have SupportMapFragment in one of my Activity. I add this fragment directly to layout xml and this layout set as content view. But when Activity is launched for th

9条回答
  •  青春惊慌失措
    2020-12-02 12:49

    I solved it by using MapsInitializer in my Application.onCreate():

    MapsInitializer.initialize(this);
    

    Good results and cleaner (and not hacky) solution!

提交回复
热议问题