2014-03-01 143 views
0

我的應用程序出現問題。 程序說:導航抽屜錯誤

"error: no suitable method found for replace(int,android.app.Fragment) 
method FragmentTransaction.replace(int,android.support.v4.app.Fragment,String) is not applicable 
(actual and formal argument lists differ in length) 
method FragmentTransaction.replace(int,android.support.v4.app.Fragment) is not applicable 
(actual argument android.app.Fragment cannot be converted to android.support.v4.app.Fragment by method invocation conversion)" 

我不知道我能用它做什麼。

+0

源代碼會有幫助。 – Dmitry

回答

2

看起來你已經在類中導入了錯誤類型的片段。你需要導入android.support.v4.app.Fragment而不是android.app.Fragment

+0

謝謝:)非常感謝 – PandaSoft

+0

不客氣,它一直在我身上發生,支持庫類與本地類命名完全相同,令人沮喪。 – SDJMcHattie