Search code examples
android-studiogradleflutteronedrive

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


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.


Solution

  • 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.