How to fix “couldn't follow symbolic link” in Android Studio?

纵饮孤独 提交于 2021-02-18 06:13:42

问题


I'm now running an Android App project on Windows and running into the condition

Error:Could not list contents of 'D:\source\App\src\main\res\drawable'. Couldn't follow symbolic link.

after did the clean build.

Android Studio states the drawable file is a broken symbolic link.

I just check other related post online but still cannot figure out what does that mean, why is that happened, and how to fix it. Can anyone help to give me a clue to fix it?


回答1:


Next time to save time you can run the following command:

find . -type l -exec test ! -e {} \; -delete



回答2:


Still do not know the real reason but problem solved by re-checkout source. Clean build did not work so I guess there's just something wrong in the project build-up steps.




回答3:


Navigate to node modules folder of particular package, and delete the .bin folder

Eg:

Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:bundleReleaseJsAndAssets'.

    Could not list contents of '/home/centillion/Documents/CMC/cmc-mobile-repo/node_modules/react-native-image-slider/node_modules/.bin/flow'. Couldn't follow symbolic link.

For this case, navigate to node modules/react-native-image-slider/node modules and delete .bin folder and rerun. NOTE: To view hidden folders, press CTRL + H




回答4:


I have always resolved this issue by using unlink followed by the path where it's not finding symbolic link.

example: unlink ./bin/uuid




回答5:


Removing .bin did not work, but rm -rf node_modules && npm install did the trick.



来源:https://stackoverflow.com/questions/43992506/how-to-fix-couldnt-follow-symbolic-link-in-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!