INTELLIJ IDEA 2018.3.4 Project dependencies and Error: Resource Compiler [SOLVED]


I came across some errors during my first HAXE/OpenFL explorations. So i think that will be good to share it here to save some time and nerves to new people :slight_smile:

  1. Error:Resource Compiler: Error: C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.4\bin\Main.hx (Access denied).

You can solve this problem easy, go to YourProjectName.iml file and change $APPLICATION_HOME_DIR$ to $MODULE_DIR$ (in this case it was outputFolder).

  1. dependencies
    Looks like INTELLIJ plugin is not handling adding dependencies very well.
    If you add new lib you will see in your iml file this line:
    <orderEntry type=“library” name=“OpenFL 8,8,0” level=“project” />

What You need to do is add this block:
<orderEntry type=“module-library” scope=“PROVIDED”>
<library name=“haxelib|openfl:any”>
<root url=“file://C:/HaxeToolkit/haxe/lib/openfl/8,8,0/src” />
<root url=“file://C:/HaxeToolkit/haxe/lib/openfl/8,8,0/src” />

Sometimes IDE will do this for you. Bear in mind that patchs to libs must be correct :slight_smile:
Hope that helps!

Best Regards