Why is this error "Type or namespace UnityEngine.UI does not exist" in windows

I am using unity 2020.1.4f . I was trying to Make a joystick So i made a script .I need to use UI element so i include UnityEngine.UI . Everything is working fine so far. Then i found a package Input System and I installed it but then this error occured. I dont Know the exact reason. I checked this problem on unity forum, Everyone said " restart unity " but this didnt work for me.
if anyone know something about this issue , Plz tell me what should i do.

Anyone who is facing this kind of problem , Try Assets> Reimport all . Still I dont know the exact reason but this is how i fixed it.