Reputation: 91
I was working fine on my project in android studio. I suddenly open it and it shows many Cannot resolve symbol
For example
private Paint p = new Paint();
gives Cannot resolve symbol 'Paint'
Although the package is imported
import android.graphics.Paint;
Another example this one too
txtBarCode.setFilters(new InputFilter[]{new InputFilter.LengthFilter(25)});
Cannot resolve symbol 'InputFilter'
import android.text.InputFilter;
Everything was working perfectly , I don't understand what changed.
I tried to build , clean , rebuild and also deleteing .idea folder
Upvotes: 0
Views: 407
Reputation: 1929
With IDE errors like that (when you still can build/run project but IDE's flashing red errors all over the place) most of the time invalidating caches should help. You can do that by selecting File -> Invalidate caches and restart
Upvotes: 1