首页 > 移动平台 > 详细

The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the

时间:2014-12-06 15:27:55      阅读:233      评论:0      收藏:0      [点我收藏+]


The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, SettingFragment, String)


今天遇到这样一个很奇葩的错误信息,后来查到我导入的包有问题  import android.app.Fragment;
import android.app.FragmentManager;   其实我应该使用的是  import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;   然后自己查看了一下API二者差别还是蛮大的   import android.app.Fragment 只能在API版本大于11的时候使用   而不包含getFragmentManager() 和 getSupportFragmentManager()  两个方法的   虽然在代码这样写不会报错的  但是  replace(int, Fragment, String)执行的时候会一直出现错误   提示上面那个错误信息


The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the

原文:http://blog.csdn.net/wangliang198901/article/details/41775225

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!