Cannot convert from android.support.v4.app.Fragment to android.app.Fragment

后端 未结 8 1580
南笙
南笙 2020-12-10 00:41

I\'m doing my first Android app, and wanted to get straight into the ICS API. I have so far created an app using an ActionBar, with swipeable tabs using Viewpager and Fragme

8条回答
  •  一个人的身影
    2020-12-10 00:49

    You can remove the support package, and that should solve your problem. It is only needed when you need functions from Android 3.0 and above in apps for earlier versions.
    In your case you get both the default Fragments from ICS, and the Fragments from the support package, and if you happen to get objects from the different packages they will not work together.

    Short version; You use either an api level above Honecomb or the support package, not both.

提交回复
热议问题