I wanted to get some clarification on this since it looks like things have recently changed with OpenFL. I just finished reading this post: JNI in latest Lime
I just found haxe/ openfl and I really like what I see. I had a question about some plugins/libs such as google play services, or other third party libs?
Also if I have some C, C++ code that works in a cross platform way that I would like to call, how can I do that?
You should be able to use native code in any native target, but the Android JNI helper code is available only in -Dlegacy right now (openfl test android -Dlegacy) but will be available in the newer Android target in the future
Within the next couple months? Android support is working pretty well, but I’m not yet sure how we want to support the JNI helper stuff (but I know it’s important for extensions)
It’s been a while and I’ve avoided really getting into openfl because of the lack of JNI support since I mainly write android apps. What’s the status of the JNI support as of now?
I tried to build legacy app (3 JNI extensions) without -Dlegacy flag and it’s compiled fine, but after run i got the errors:
E/ExtendedExtractor: Failed to open MM_PARSER_LIB, dlerror = Cannot load library: load_library[1096]: Library 'libmmparser.so' not found
E/ExtendedExtractor: Failed to open MM_PARSER_LITE_LIB, dlerror = Cannot load library: load_library[1096]: Library 'libmmparser_lite.so' not found
A/libc: Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1)
Do you now… I tried to compile openfl-samples 3,3,1.
“openfl test flash” - works fine
“openfl test android” - compilation error at the end for all projects (with -Dlegacy flag same):
C:\android\sdk\tools\ant\build.xml:888: The following error occurred while executing this line:
C:\android\sdk\tools\ant\build.xml:890: The following error occurred while executing this line:
C:\android\sdk\tools\ant\build.xml:902: The following error occurred while executing this line:
C:\android\sdk\tools\ant\build.xml:283: null returned: 1
Google returned me back to forum)
Problem was with “,” symbols in path openfl-samples\3,3,1… Android Build tools doesn’t like this chars =
Samples work fine now on android.
Joshua recommends copying the sample project into another folder using “openfl create [sample project name].” I assume that’s so you can make changes without messing up the original, but this could be another reason.