Issue
My code sample -
final Drawable upArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_material);
upArrow.setColorFilter(getResources().getColor(R.color.white), PorterDuff.Mode.SRC_ATOP);
getSupportActionBar().setHomeAsUpIndicator(upArrow);
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v){
finish();
}
});
It was working fine. But today I open the project and it is showing " Cannot resolve symbol 'abc_ic_ab_back_material' "
Solution
Rebuilding your project might fix the problem, if not Make sure that you have imported the correct R class, it should be like
import <YourPackage>.R;
if it is correct, then make sure you have the drawable inside your drawable
folder. If so then try File -> Invalidate Cache -> Invalidate and Restart
Answered By - Sreehari K
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.