Eclipse doesnt recognize android.support.v13.app.FragmentActivity although I have android-support-v13 library

后端 未结 2 1150
暖寄归人
暖寄归人 2021-01-20 01:05

I\'m struggling with this error and I really can\'t get it right. I try to import android.support.v13.app.FragmentActivity; into a class but it gives me the error: The impo

2条回答
  •  心在旅途
    2021-01-20 01:27

    FragmentActivity is part of the v4 folder though right? v13 just means API 13 and above will use the classes in that folder. So while you may have that folder, I bet it doesn't have FragmentActivity in it :) Change your imports to have the v4 rather than the v13.

    http://developer.android.com/reference/android/support/v4/app/FragmentActivity.html

    So you know you can't use Fragment from the OS if you are using the SupportLib, you have to use only the Fragment classes inside the SupportLib. This include Fragment itself.

    http://developer.android.com/reference/android/support/v4/app/Fragment.html vs http://developer.android.com/reference/android/app/Fragment.html.. Basically anything inside of android.app that has to do with Fragments, cannot be used with your SupportLib classes. They are not the same class hierarchy nor are they compatible.

提交回复
热议问题