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

查看:154
本文介绍了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天全站免登陆