错误:(22,116)错误:不兼容的类型:片段无法转换为BottomPictureFragment

时间:2015-06-01 12:45:23

标签: java android android-fragments

它与教程中的代码相同,但是当我尝试代码时。它给了我上面的错误。

Error:Execution failed for task ':app:compileDebugJava'.
Compilation failed; see the compiler error output for details.

还有一个错误

outer

1 个答案:

答案 0 :(得分:3)

WebClient wc = new WebClient(); wc.Headers.Add("Fk-Affiliate-Id", "My Fk-Affiliate-Id"); wc.Headers.Add("Fk-Affiliate-Token", "My Fk-Affiliate-Token"); var temp = "https://affiliate-api.flipkart.net/affiliate/search/json?query+txtWeb.Text; var getjson= wc.DownloadString(temp); Response.Write(getjson); 中,将扩展班级BottomPictureFragment的导入更改为Fragment。看来,你是别的东西。你应该有这样的东西:

import android.support.v4.app.Fragment;