我在Intellij上的项目不再运行我的项目,它不断抛出一些编译错误。

我已经尝试过重建,构建以及使缓存无效/重新启动,但是我没有工作,我也在下面检查了此链接,但是对我来说不起作用:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/206885455-java-Cannot-find-JDK-1-7-for-module

我不断收到这个错误

java.io.FileNotFoundException: /home/byteworks/Documents/Projects/ics-assessment-api/ics-assessment-controller/out/production/resources/customers-template/AGENCY_CUSTOMER_MASTERLIST_TAXPAYER v1.0.xlsx (Permission denied)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    at com.intellij.openapi.util.io.FileUtil.openOutputStream(FileUtil.java:492)
    at com.intellij.openapi.util.io.FileUtil.performCopy(FileUtil.java:452)
    at com.intellij.openapi.util.io.FileUtil.copyContent(FileUtil.java:447)
    at org.jetbrains.jps.incremental.FSOperations.copy(FSOperations.java:437)
    at org.jetbrains.jps.gradle.compiler.GradleResourceFileProcessor.copyFile(GradleResourceFileProcessor.java:68)
    at org.jetbrains.jps.gradle.compiler.GradleResourcesBuilder.build(GradleResourcesBuilder.java:101)
    at org.jetbrains.jps.gradle.compiler.GradleResourcesBuilder.build(GradleResourcesBuilder.java:28)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildTarget(IncProjectBuilder.java:1037)
    at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1018)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1074)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:968)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:797)
    at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:375)
    at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
    at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
    at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:302)
    at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:135)
    at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:229)
    at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Please perform full project rebuild (Build | Rebuild Project)```

最佳答案

正如其他人说的那样,拒绝权限,文件夹或文件是否已通过某种形式的保护/防病毒移动或更改?

该错误似乎是它试图从中复制文件的位置
/ home / byteworks / Documents / Projects / ics-assessment-api / ics-assessment-controller / out / production / resources / customers-template / AGENCY_CUSTOMER_MASTERLIST_TAXPAYER v1.0.xlsx

那还是xlsx所在的路径吗?也不应是xslx。

这可能是您在build.gradle copy命令中的文件名中有错字的问题吗?
看起来您在某种形式的Linux计算机上,因为您具有/ home / byteworks文件夹,您是用户byteworks吗?如果没有,则您有权访问byteworks文件夹,因为用户可以限制对其Documents文件夹的访问。如果在文件夹中执行ls -la检查文件所有者和权限,则可以看到标志,
_rwxrwxrwx-标志是
_ = SetUUID / SetGroup / Sticky标志
rwx-所有者权限读写执行(执行也是ls对文件夹的查看权限)
rwx-组权限
rwx-其他权限-如果最后一个是___,则意味着不是所有者的任何人都没有访问该文件的权限。

07-24 09:33