symbolic links on Windows

2019-06-08 15:37发布

问题:

I try to create symbolic link on Windows (as 1st answer to Is there any way to integrate Eclipse with Gradle in Android project?)

On linux it is

ln -s src/main/res res
ln -s src/main/AndroidManifest.xml AndroidManifest.xml

Windows 7 has mklink util, but it just did not work on my PC.

I found a great Junction util and could do junction res src/main/res, but for link to file is created .lnk file (aka Windows shortcut).

I discovered that Git Bash can execute ln -s src/main/AndroidManifest.xml AndroidManifest.xml but it creates copy, not link.

回答1:

Use elevated-command-prompt

If error, check "SeCreateSymbolicLinkPrivilege", possibly turn off UAC.