my compiler doesn't recognize resources and ids

142 Views Asked by At

I have used commonsware's source code to make iconic-adapter project in android(you can find the source here http://github.com/commonsguy/cw-omnibus/tree/master/Selection/Dynamic) but i have some problems:

super(DynamicSample.this, R.layout.row, R.id.**lable**, items);//it doesn't recognize "lable"

if (items[position].length()>4) {
        icon.setImageResource(R.drawable.**delete**);
      }

//doesn't recognize delete, I have copied the //proper picture in drawable-mdpi

I appreciate your answers in advance

2

There are 2 best solutions below

1
On BEST ANSWER

There are three things u should notice what is the R you have imported it is good idea to have drawable copied in all folders or at least parent drawable directory @id not being there please check the declaration of lable again.

6
On

Make sure that you have a lable string resource (note: this is not the spelling from my book or my code).

Beyond that, clean your project (e.g., Project > Clean in Eclipse).