Rahul
Rahul

Reputation: 91

Cannot resolve symbol 'Paint' android studio

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

Answers (1)

qki
qki

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

Related Questions