Rtools not detected by rstudio

Am using windows 10, and have the latest version of R and Rstudio and Rtools.
Am currently new in stan and trying to learn, self study? But have issues with instalation of Rstan.

I run the code “install.packages(“rstan”, repos = “https://cloud.r-project.org/”, dependencies = TRUE)”
i dont get any error and rstan installs very well.

Then I try Checking the C++ Toolchain by running the code
“pkgbuild::has_build_tools(debug = TRUE)” all done in Rstudio.

Note that I already have the latest version of Rtools installed on my windows computer.
The code above prompts me to install rtools (yet already installed).
Of course when I say yes it already warns me that there is already a version (3.5) of rtools installed, and warns that should first uninstall it.
Is there a solution to this problem? What can I do?
Thank you

You can try first doing

options("buildtools.check" = FALSE)
1 Like

Thankyou for the immediate reply
"Error: Can’t find ‘C:\Windows\system32\Building R package from source’ "
This is the error i receive