Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caused by: java.lang.AssertionError: Could not delete caches dir yourProject\build\kotlin\compileDebugTestingKotlin

Sometimes this unexpected message appear and the only way to deal with this is to restart the pc and when it starts again go to the obove path and delete the file before start Android Studio with the project. It works for some time but latter appears again. Maybe someone of you know how deal better with this annoying issue.

CreateProcess error=206, El nombre del archivo o la extensión es demasiado largo
Caused by: java.lang.AssertionError: Could not delete caches dir YourProjectPath\build\kotlin\compileDebugTestingKotlin
like image 905
Oscar Ivan Avatar asked Jan 21 '21 17:01

Oscar Ivan


2 Answers

In windows open task manager.

  • Go to details tab.
  • Look for Java.exe.
  • End Task for all instances of Java.exe.

This works perfectly for me.

like image 92
Debdutta Panda Avatar answered Nov 20 '22 13:11

Debdutta Panda


Notice: This happens with the newer AndroidStudio 4.2.x.

Temporary solution:

Delete (the contents of) the folder which is giving you the issue. For example:

..\app\build\kotlin\compileDebugKotlin\caches-jvm\inputs

If you get: "The file is open in OpenJDK Platform Binary" you'll need to stop these processes through Windows Task Manager > Details > Java.exe.

Please know that with this method the error will repeat again after several assembly attempts.

UPDATE:

Google hasn't provide us a fix, so you'll need to downgrade to an older version which works for you. 4.1.3 seems to be working fine.

like image 27
AlexS Avatar answered Nov 20 '22 11:11

AlexS