How to fix "couldn't follow symbolic link" in Android Studio?
Asked Answered
T

5

9

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?

Toscana answered 16/5, 2017 at 4:27 Comment(0)
T
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.

Toscana answered 17/5, 2017 at 8:3 Comment(0)
S
23

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

find . -type l -exec test ! -e {} \; -delete
Sadler answered 17/8, 2018 at 10:23 Comment(3)
Does this delete all broken symbolic links?Tess
and run this in your app base, not android folder :DBrood
I don't know what I could do without this. Thanks... I believe this should be marked as answerGaw
T
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.

Toscana answered 17/5, 2017 at 8:3 Comment(0)
A
1

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

example: unlink ./bin/uuid

Amoeba answered 16/3, 2020 at 5:24 Comment(0)
B
1

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

Bosom answered 8/12, 2020 at 10:29 Comment(1)
Please be careful with posting extremely similar answers. #46270786 Consider flagging as duplicate....Bigelow
P
0

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

Postnatal answered 12/11, 2019 at 6:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.