“Error inflating class fragment” with google map

前端 未结 10 1929
有刺的猬
有刺的猬 2020-12-01 09:29

I tried to make a sample project using Google Map, but I couldn\'t. Help me please!

Test Device : Android 4.0.4


Error Message :

12-2         


        
10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-01 10:09

    In my case, I had to do two corrections to make this exception go away.

    1. The activity should extend FragmentActivity and not Activity
    2. Manifest file needs a uses-permission for ACCESS_NETWORK_STATE (my file already had INTERNET permission)

提交回复
热议问题