The method getSupportFragmentManager() is undefined for the type MessageActivity
2017-05-26 17:32
609 查看
使用ViewPager + Fragment实现滑动标签页的时候出现了这样的错误,那是因为
很明白吧,没有继承FragmentActivity
, so你懂得。。。
但是我继承了
FragmentActivity 之后又出现了大量的错误
再导入
import android.support.v4.app.FragmentActivity;
ok
很简单!
你懂得
down votaccepted | You import FragmentActivity, but you don't use it. Activityis not from v4 nor from v7 support libraries. This should work: public class MainActivity extends FragmentActivity { |
, so你懂得。。。
但是我继承了
FragmentActivity 之后又出现了大量的错误
再导入
import android.support.v4.app.FragmentActivity;
ok
很简单!
你懂得
8down voteaccepted | You import FragmentActivity, but you don't use it. Activityis not from v4 nor from v7 support libraries. This should work: public class MainActivity extends FragmentActivity { |
相关文章推荐
- android开发:The method getSupportFragmentManager() is undefined for the type
- The method getSupportFragmentManager() is undefined for the type
- fragment 里需要activity。Android-The method findViewById(int) is undefined for the type first (Fragment)
- 开发中碰到的问题:The method getSystemService(String) is undefined for the type CourseFragment
- 出现错误:The method getCriteriaBuilder() is undefined for the type EntityManager.
- The method getDispatcherType() is undefined for the type HttpServletRequest
- The method getTextContent() is undefined for the type Node
- Spring找不到方法:The method getDispatcherType() is undefined for the type HttpServletRequest
- The method getTextContent() is undefined for the type Node
- The method getTextContent() is undefined for the type Element
- The method getTextContent() is undefined for the type Node
- The method getTextContent() is undefined for the type Node 的解决办法(eclipse)
- The method getDispatcherType() is undefined for the type HttpServletRequest
- 解决The method getCookieStore() is undefined for the type HttpClient
- The method getTextContent() is undefined for the type Element
- The method getTextContent() is undefined for the type Node
- The method getDispatcherType() is undefined for the type HttpServletRequest 升级到tomcat8
- The method getDispatcherType() is undefined for the type HttpServletRequest的解决方法
- the method getDispatcherType() is undefined for the type HttpServletRequest
- The method getTextContent() is undefined for the type Node