Cannot import library on Haxe & FlashDevelop

2019-08-07 05:38发布

问题:

I added some classes through http://lib.haxe.org/ and git with the correct command (haxelib install x) and, while the classes are in the haxe/lib folder, I can't access most of them. Sometimes I'm able to import a library(I get the autocomplete and everything), but when I try to compile it gives me the error Class not found.

I searched everywhere and I still don't know how to fix this. I tried to add through Project>Properties>Classpath and I'd even edited the global Classpath but it still won't work. Right now my problem is with the library linden-google-play but I tried with another libraries and it didn't work either.

AdMob and Firetongue libraries work perfectly, and I can't understand why. Does anyone knows a way to fix this? Thanks!

回答1:

I finally found out how to do it. You have to go to Project.xml and add the library name manually.

<haxelib name="openfl" />
<haxelib name="task" />


回答2:

You don't need to change the class path configuration that is reserved for your local projects/libraries. Go to Project Properties>Compiler Options>Libraries and add one library per line (the lib name must match what you used in haxelib install ...).