Reload is required for plugin development.


The doc below is what i have tried: 

But when i run buildPlugin in gradle, execution failed at prepareSandbox: Could not copy file

What i have tried:

1.Enable autoReloadPlugin BY:

2. Disable buildSearchableOptions BY:


After code changed, when run buildPlugin, what do i get:

Comment actions Permalink


1. Your plugin uses Gradle as far as I understand. Why do you set system property for auto-reloading in run configuration? System property is needed only for the DevKit approach. In Gradle projects it is enabled by default from 2020.2, but in case it has to be set manually, it should be done in runIde task in your file.

2. What file cannot be copied and why? Are there any details? Did you try to run it with --stacktrace option?



Comment actions Permalink

I run into the same problem on Windows 10. On macOS it runs fine.

The error message says (german): 

Der Vorgang ist bei einer Datei mit einem geöffneten Bereich, der einem Benutzer zugeordnet ist, nicht anwendbar

Which translates to:

The operation is not applicable to a file with an open area assigned to a user

Here is the stack trace. I deleted most of gradle calls to make it short.

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':prepareSandbox'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(
Caused by: org.gradle.api.internal.file.AbstractFileTreeElement$CopyFileElementException: Could not copy file '<project-root>\build\libs\<project-name>-1.0-SNAPSHOT.jar' to '<project-root>\build\idea-sandbox\plugins\<project-name>\lib\<project-name>-1.0-SNAPSHOT.jar'.
    at org.gradle.api.internal.file.AbstractFileTreeElement.copyTo(
    at org.gradle.api.tasks.AbstractCopyTask.copy(
    at org.jetbrains.intellij.tasks.PrepareSandboxTask.copy(PrepareSandboxTask.kt:64)
Caused by: <project-root>\build\idea-sandbox\plugins\<project-name>\lib\<project-name>-1.0-SNAPSHOT.jar (Der Vorgang ist bei einer Datei mit einem geöffneten Bereich, der einem Benutzer zugeordnet ist, nicht anwendbar)
    at org.gradle.api.internal.file.AbstractFileTreeElement.copyFile(
    at org.gradle.api.internal.file.AbstractFileTreeElement.copyTo(
    ... 152 more
Comment actions Permalink

Hi, there. Delayed response for a long vacation.

The problem is same as that the post above presented.

1. I run the Plugin build on Windows and haven't tried it on MacOS.

2. After run with --stacktrace, stacktrace shows FileNotFoundException while the error message still in messy.

3. Where to set auto-reloading in gradle? 

Comment actions Permalink

Hi Xean,

It may be caused by antivirus. Please exclude the sandbox directory from scanning and see if it solves the problem.

Comment actions Permalink

Hi Cesare,

It should be enabled by default for platforms >= 2020.2 according to Enabling Auto-Reload docs.

If your plugin still can't auto-reload, please make sure that all of your extensions registered in the plugin.xml file are dynamic. See Dynamic Plugins for details.

Comment actions Permalink

I'm having a similar problem but in my case the plugin jar is locked by the JBR java executable (on windows):

Execution failed for task ':prepareSandbox'.
> Could not copy file 'G:\tph-toolbox\build\libs\tphToolbox-2.11.0.jar' to 'G:\tph-toolbox\build\idea-sandbox\plugins\TPH Toolbox\lib\tphToolbox-2.11.0.jar'.
   > G:\tph-toolbox\build\idea-sandbox\plugins\TPH Toolbox\lib\tphToolbox-2.11.0.jar (The requested operation cannot be performed on a file with a user-mapped section open)


Is this perhaps something that doesn't work on windows?

Comment actions Permalink

Any updates on this? I'm having the same issue under Windows 11 for IntelliJ 2021.1.3

Comment actions Permalink

I have the same problem on windows7 for 2022.3.1


Please sign in to leave a comment.