Gradle Error: Path is not a readable directory for an Android Project saved in OneDrive

9,954

Solution 1

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.

Solution 2

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.

Solution 3

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]

Solution 4

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.

Solution 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
Share:
9,954
Pjotr Gainullin
Author by

Pjotr Gainullin

Updated on December 18, 2022

Comments

  • Pjotr Gainullin
    Pjotr Gainullin over 1 year

    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.