firebasekotlingradleintellij-idea

CreateProcess error=206 The filename or extension is too long


I'm trying to run my project in IntelliJ IDEA in debug or run mode, and it is throwing me always this:

Cannot run program "C:\corretto11\bin\java.exe" (in directory "C:\project-be"): CreateProcess error=206, The filename or extension is too long

I have both in C root, I tried to google it and search in Stack Overflow, but nothing that I found was working.

EDIT:

The problem comes when I add the following dependency:

implementation("com.google.firebase:firebase-admin:8.1.0")

To be honest, no idea what could I do, if I remove the dependency it works like magic.


Solution

  • In addition to changing the run configuration, you must also enable this in your workspace. It's quite silly that this is still required, and not enabled by default.

    Open the file .idea/workspace.xml file from your project root folder, go to section

    <component name="PropertiesComponent">

    and add the following:

    <property name="dynamic.classpath" value="true" />