devtools 找不到 Rtools,但 ls 和 gcc 在 PATH 上

Rtools not found by devtools, but ls and gcc are on PATH

Sys.which('gcc')
                                                                 gcc 
"C:\Users\[redacted]\Documents\aps\Rtools\mingw_32\bin\gcc.exe" 

Sys.which('ls')
                                                       ls 
"C:\Users\[redacted]\Documents\aps\Rtools\bin\ls.exe" 

find_rtools(cache=FALSE,debug=TRUE)

Scanning path...
ls : C:\Users\[redacted]\Documents\aps\Rtools\bin\ls.exe 
"C:/Users/[redacted]/Documents/aps/rportnov/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD  \
  config CC 

Scanning registry...
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 3.4 from http://cran.r-project.org/bin/windows/Rtools/.

这是安装过程中生成的注册表的问题,所以我重新安装了它并且有效。