This process cannot access the file because the file is being used by another process (java.nio.file.FileSystemException) in KOTLIN

Viewed 25

In Kotlin when I tried to run file I faced with this issue. It says 'This process cannot access the file because the file is being used by another process' here in English.

This is the command line error in compile time

1 Answers

To solve it follow these steps

1 ) In your IDE probably DefaultPreview shows as chosen, click on it and change it to app

enter image description here

2) It should look like this at the and:

enter image description here

This should solve your problem.

Related