Error when trying to open RStudio.

I installed R, then installed RStudio, but when I open RStudio, I get an error: error loading R
An error occurred while attempting to load the selected version of R. Please select a different R installer.
I'll post the image to help.

Does R start from a terminal or desktop icon?

What version of RStudio are you using?

I'm downloading from the Positivo website. The version is R-4.5.1-win. The RStudio version is R-2025.05.1-513.

R is starting with the icon.

If you switch to the first option (default 64-bit version of R) in the dialog shown, does it help?

I can't switch. It doesn't give me that option even though it shows the screen.

Was this a first installation of both R and RStudio, or were you reinstalling/upgrading either of them?

The first time I installed it, I got this error. I uninstalled it, deleted all the directories, then tried again, but it kept giving me the same error.
The version is R-4.5.1-win. The RStudio version is R-2025.05.1-513.

It may be a long shot but try resetting RStudio Desktop's State

It is not deleted when you remove RStudio and it can cause problems some times.