IDEA error - Haxe SDK has no valid root. Set up or change SDK


(Дмитрий Маликов) #1

so autocomplete and navigation for std haxe classes not work
how to fix it?

(Valentin Lemière) #2

Strange place to have haxe installed, what os is that?

I think the “haxe toolkit home path” should be the path were there is the haxe std folder.

(Дмитрий Маликов) #3

this path i got from

which haxe

my os is ArchLinux

how i can find haxe std lib folder then?

(Valentin Lemière) #4

If you installed then the path should be /usr/share/haxe/ or maybe /usr/share/haxe/std/ not sure which one is expected.

(david mouton) #5

Just install IDEA and got the same error.
Add /usr/share/haxe/std to SRC and class path fix it
Use locate command to find haxe sdk

(Eric Bishton) #6

David has the right solution, though /usr/share/haxe/std may not the be place that the std library is installed on your computer. Once you have the right path, add it to both the Class Path and Source path tabs on the SDK configuration screen you show above. Also, it must be the only entry in both the class and source paths.

You will also need to find the neko executable and fill out that field, because haxelib relies upon it, and the plugin relies upon haxelib.

(Дмитрий Маликов) #7

it works.

(Дмитрий Маликов) #8

have error for this imports - UNresolved symbols

import php.Global;
import php.SuperGlobal;
import php.Syntax;


import php.NativeArray;
import php.Lib;

is ok

(Valentin Lemière) #9

You need the -D php7 define to use the new php target with haxe 3 (it is the default and only one on haxe 4).
There should be some project parameter window were you can add this.

(Дмитрий Маликов) #10

didn’t found this parameter in IDEA settings

(Valentin Lemière) #11

Maybe adding it to your hxml would be enough, not sure how idea gets its project parameters.

(Дмитрий Маликов) #12

have this file


-main Main
-php bin
-D php7
–php-prefix ModuleName1

(Eric Bishton) #13

Putting the define into the hxml is the right way to do it. Be sure that your module settings (File->Project Structure->Module->Haxe) are set to use the correct hxml file.

If IDEA isn’t finding the symbols, browsing, or highlighting correctly, you will also have to add php7 to the ‘macros’ setting in the module settings page (they are project-wide, actually).

(Дмитрий Маликов) #15

found it
when recreated project and installed EAP edition IDEA

(Дмитрий Маликов) #16

made this configuration
but its not work 002