Error with R and R studio

Hello,
I've installed R and Rstudio for the first time (both the newest versions).
Since i used it for the first time, i always get a notification "Error: unable to establish a connection with Rstudio" and i can't save my scripts or even solve simple things such as 2+2.
But my "normal R" works just fine. Someone told me to install an older version of R and Rstudio but i actually need the newer ones because of packages I will have to use in my coming classes.
Has anyone had that problem before and might be able to help me?
Thanks.

My first thought is you may be running antivirus or firewall software that blocks R Studio, and Rstudio may need to be granted a bypass?