Gradle错误:对于在OneDrive中保存的Android项目,路径不是可读目录 [英] Gradle Error: Path is not a readable directory for an Android Project saved in OneDrive
问题描述
我尝试使用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:
- 更新Android Studio
- 以管理员身份运行Android Studio
-
从我的依赖项中删除[package](这导致错误消息中标识了其他软件包).
- Updating Android Studio
- Running Android Studio as Administrator
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屋!