33

I tried to use a OneDrive folder to store my Flutter project [Windows 10, Android Studio]. I then made edits to it on another machine [same configurations]. The project compiled fine on the first machine initially and on the second one after the changes. Running it on the first machine again after the changes I get the below error:

Execution failed for task ':app:processDebugResources'. 

Path "build/[package]/intermediaries/compiled_local_resources" is not a readable directory.

I've tried a number of solutions mentioned in similar, though not equivalent issues:

  1. Updating Android Studio
  2. Running Android Studio as Administrator
  3. Removing the [package] from my dependencies (this resulted in a different package being identified in the error message).

  4. Pressing File -> Invalidate Caches / Restart...

  5. Commenting out "org.gradle.jvmargs=-Xmx1536M" in gradle.properties

  6. Doing:
cd android 
gradlew clean

None of this worked.

Kirill Matrosov
  • 5,564
  • 4
  • 28
  • 39
Pjotr Gainullin
  • 948
  • 1
  • 9
  • 16

7 Answers7

151

I had the same problem today:

Path "build/[package]/intermediaries/compiled_local_resources/debug/out" is not a readable directory.

I was able to fix this issue by deleting the .gradle and rebuilding the project.

Vadow
  • 1,626
  • 1
  • 5
  • 4
5

All I did was create the (empty) directory that it was looking for and it built fine afterward.

mkdir -p compiled_local_resources/debug/out
HimalayanCoder
  • 9,630
  • 6
  • 59
  • 60
4

I had the same issue, came out of no where and it really shouldn't make the build fail... but all I did was create the (empty) directory that it was looking for and it built fine afterwards.

buradd
  • 1,271
  • 1
  • 13
  • 19
  • Didn't work for me: the subfolders `compiled_local_resources\debug\out\` that I created got deleted on build. – Sébastien Nov 04 '20 at 09:03
2

In the end the only thing that worked for me was pushing the project up to a Git remote and cloning it from there into another (local) directory.

[not sure this counts as a solution but nothing else worked for me after a long agonising search so hopefully it helps someone]

Pjotr Gainullin
  • 948
  • 1
  • 9
  • 16
  • Thanks for this suggestion! The .gradle solution didn't work for me so I recloned my project and it worked. – Tiffany Apr 21 '20 at 21:05
2

I know the OP had Windows, but if it helps anyone else in the future:

On Mac OS I discovered (the hard way) that Android Studio and Flutter do not play nice with being stored in iCloud! I noticed that some files weren't available locally and that's what was causing the problem for me. I moved my project out of iCloud (forcing it to download the missing files forever) and then it was fine.

KidIcarus271
  • 144
  • 2
  • 9
2

Deleting the android/.gradle folder worked for me.

Adnan Alshami
  • 949
  • 1
  • 7
  • 22
Caironite
  • 21
  • 2
0

+1 also to the #1 answer (Vadow). As I do not have 50 points yet was not able to add this as a comment, so will have to post separately.

Like the OP, I have two machines - and got into trouble (Synology Drive). Vadow's solution worked for me, but I also had to do:

  • Flutter Clean
  • Flutter Pub Get

on the terminal and from within the project directory to get things follow back up and running.

Thank you Stackoverflow, and thank you Vadow!