My question is about when I updated android studio up to latest version of 3.1 and when open a project then it gives me error and i try to invalidate caches and restart android studio but still error is not gone as shown below
SOLVED
Click on File >> Close Project
Delete .idea folder in project Directory
and it works