The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument
生活随笔
收集整理的這篇文章主要介紹了
The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Fragment 的使用過程中總是遇到各種各種奇怪的報錯,
例如這樣的
錯的根本原始嗎就是包導入錯了,也不算導入錯了,就是導入的包匹配
這個不匹配就是你的activity中導入的包和幾個fragment中導入的包不匹配
我畫了一個簡易的圖,就是fragment 一般會提示你的導入的包,
假如 選v4包那么所有的都要選v4包,要是選app包都要選app包
這樣才不會報錯誤的。
包導入之后錯誤就會自動消失了
看剛才這個地方的錯誤消失了!!!!!!
總結
以上是生活随笔為你收集整理的The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the argument的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ecplise 工具字体大小的调整
- 下一篇: AndroidManifest.xml