Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 559
sin0x1 Avatar asked Feb 27 '26 23:02

sin0x1


1 Answers

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
like image 159
Darish Avatar answered Mar 02 '26 12:03

Darish



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!