Cannot import library on Haxe & FlashDevelop

核能气质少年 提交于 2020-01-06 03:20:20

问题


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 ...).



来源:https://stackoverflow.com/questions/27789554/cannot-import-library-on-haxe-flashdevelop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!