Gradle 错误:路径不是 OneDrive 中保存的 Android 项目的可读目录 [英] Gradle Error: Path is not a readable directory for an Android Project saved in OneDrive

查看:39
本文介绍了Gradle 错误:路径不是 OneDrive 中保存的 Android 项目的可读目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用 OneDrive 文件夹来存储我的 Flutter 项目 [Windows 10, Android Studio].然后我在另一台机器上对其进行了编辑 [相同的配置].该项目最初在第一台机器上编译得很好,在更改后在第二台机器上编译得很好.更改后再次在第一台机器上运行它,我收到以下错误:

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. 更新 Android Studio
  2. 以管理员身份运行 Android Studio
  3. 从我的依赖项中删除 [package](这导致了错误消息中标识了不同的包).

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

按文件 -> 使缓存无效/重新启动...

Pressing File -> Invalidate Caches / Restart...

注释掉gradle.properties 中的org.gradle.jvmargs=-Xmx1536M"

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

cd android 
gradlew clean

这些都没有用.

推荐答案

我今天遇到了同样的问题:

I had the same problem today:

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

我能够通过删除 .gradle 并重建项目来解决这个问题.

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

这篇关于Gradle 错误:路径不是 OneDrive 中保存的 Android 项目的可读目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆