类别”与属性android:iconTint(attr)颜色不兼容

时间:2018-07-20 20:03:45

标签: android

我创建了2个片段类别并进行了排名,但显示无法解析'R'

我没有清理项目并重建项目,但是没有用。我该怎么办?

这是我的代码;

 public View onCreateView(@NonNull LayoutInflater inflater, 
 @NullableViewGroup container, @Nullable Bundle savedInstanceState) 
{
    myFragment= inflater.inflate(R.layout.fragment_ranking,container,false);
    return myFragment;
}

这是相同的错误,R用红色显示! :(

 public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    myFragment= inflater.inflate(R.layout.fragment_category,container,false);
    return myFragment;
}

0 个答案:

没有答案