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

后端 未结 2 1184
暖寄归人
暖寄归人 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:36

    This is the answer I gave to a very similar question:

    Change the "import android.support.v13.app.FragmentActivity" to "import android.support.v4.app.FragmentActivity"

    For the undefined part, try this syntax:

    public class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
    public ScreenSlidePagerAdapter (android.support.v4.app.FragmentManager fm) {
        super(fm);
    }
    

    and:

    @Override
    public android.support.v4.app.Fragment getItem(int position) {
        return ScreenSlidePagerAdapter.create(position);
    }
    

提交回复
热议问题