Cody
Cody

Reputation: 1879

Android Studio: Cannot resolve symbol AsyncTask

Android studio is driving me crazy with this error message! Everything was working fine until my PC crashed and ever since Android Studio is throwing compiler errors for my AsyncTaskClass. It's almost as if the android.os.AsyncTask import doesn't do anything all of a sudden. I'm running the latest build tools (25.0.1) and compiling with the latest API (v25). What can I do to fix this and get my AsyncTask working again?enter image description here

EDIT: To give some background: I've cleaned and rebuilt a dozen times to no avail. I've also tried the solution here but I already had the proper build/API set. Very confused.

Upvotes: 1

Views: 2587

Answers (1)

Cody
Cody

Reputation: 1879

The solution was to open Android Studio and select File -> Invalidate Caches/Restart.

Upvotes: 1

Related Questions