Linux-Gradle可以';t删除临时文件,生成失败
当我执行Linux-Gradle可以';t删除临时文件,生成失败,linux,gradle,ntfs,android-studio-2.2,Linux,Gradle,Ntfs,Android Studio 2.2,当我执行$gradle:android:clean或$gradle:android:assembleDebug时,我得到 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':android:mergeDebugResources'. > Error: Could not delete path '/media/naxa/<NTFS Partition>/
$gradle:android:clean
或$gradle:android:assembleDebug
时,我得到
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':android:mergeDebugResources'.
> Error: Could not delete path '/media/naxa/<NTFS Partition>/<Project Path>/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values-sk'.
失败:生成失败,出现异常。
*出了什么问题:
任务“:android:mergeDebugResources”的执行失败。
>错误:无法删除路径“/media/naxa///android/build/intermediates/incremental/mergeDebugResources/merged.dir/values sk”。
我想提及的是,该项目位于NTFS分区上
我找到了一个解决方法,我正在使用
--continue
选项忽略构建失败。但是我想知道为什么这个文件不能被删除。它被什么东西阻挡了吗?这是一个已知的问题,已在Studio 2.2 preview 3中修复。你可以在这里找到更多信息
如果您在Windows上看到问题,请遵循注释64: 有一个工具可以用来获取打开文件的代码的堆栈跟踪,该文件仍被进程保留。这是我用来生成部分修复的堆栈跟踪的工具 您需要使用java代理运行studio
如果您使用的是Linux,并且使用的是NTFS,请取消对bin/idea.properties中的以下属性的注释:
#---------------------------------------------------------------------
# IDEA can copy library .jar files to prevent their locking.
# By default this behavior is enabled on Windows and disabled on other platforms.
# Uncomment this property to override.
#---------------------------------------------------------------------
# idea.jars.nocopy=false
如果您中的任何人在使用2.2 Beta版或更高版本时仍然看到此问题,请提交一个新的错误。可能重复的错误