代码之家  ›  专栏  ›  技术社区  ›  naXa stands with Ukraine

Linux-Gradle无法删除临时文件,生成失败

  •  3
  • naXa stands with Ukraine  · 技术社区  · 9 年前

    当我执行 $ 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'.
    

    我想提及的是,该项目位于NTFS分区上。

    我找到了一个解决方法,我正在使用 --continue 选项忽略生成失败。但我想知道为什么文件不能被删除。它被什么东西挡住了吗?

    1 回复  |  直到 9 年前
        1
  •  1
  •   naXa stands with Ukraine    9 年前

    这是一个已知的问题,已在Studio 2.2预览版3中修复。您可以在此找到更多信息 thread .


    如果你在 窗户 如果您看到了问题,请遵循注释#64:

    有一个工具可以用来获取打开文件的代码的堆栈跟踪,该文件仍由进程保存。这是我用来生成部分修复的堆栈跟踪的工具。

    http://file-leak-detector.kohsuke.org/

    您需要使用java代理运行studio。


    如果你在 Linux操作系统 并且您正在使用NTFS,请在bin/idea中取消注释以下属性。属性:

    #---------------------------------------------------------------------
    # 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版或更高版本时继续看到此问题,请提交一个新的bug。