Binary XML file line #15: Error inflating class fragment

前端 未结 2 914
醉梦人生
醉梦人生 2021-01-26 09:51

i have this xml which contains google maps v2:



        
相关标签:
2条回答
  • 2021-01-26 10:28

    If you are running your code for API level <11, use FragmentActivity instead of extending Activity and in XML, use "com.google.android.gms.maps.SupportMapFragment"

    0 讨论(0)
  • 2021-01-26 10:32

    Your problem is below 3.0 versions not support Fragments, but you are using.

    Solution:

    1)set your minimumSDk="11" and run into 3.0 or above versions of device.
           or
    2)Use SupportMapFragment instead of MapFragment and Add Support Library
    into your project.
    
    (Right click on your project -> Android Tools -> click Add Support Library)
    
    0 讨论(0)
提交回复
热议问题