sin0x1
sin0x1

Reputation: 125

Cannot resolve symbol "Intent"

I am having a problem with importing Intent and View in android studio. Everything was working fine and all of sudden this error popped up!

here is how i am importing both Intent and View in the MainActivity.java Class

import android.content.Intent;
import android.view.View;

here is a picture of the error i am getting

here is the error

i am having the same errors in other activities also,other than MainActivity.java

Upvotes: 3

Views: 8502

Answers (1)

Darish
Darish

Reputation: 11481

Try the following

  • Rebuilding the project
  • Cleaning the project
  • Syncing with Gradle Files
  • Closing the Project, closing AS and relaunching / reopening
  • File > Invalidate Caches / Restart
  • Double checking all support libraries are up to date in the SDK manager
  • Exit Android Studio
  • Back up your project
  • Delete all the .iml files and the .idea folder, build folder
  • Relaunch Android Studio and reimport your project

Upvotes: 2

Related Questions