4 ms·
I think he's mostly talking about the Android NDK (Native Development Kit), which is required for C/C++ development and makes use of Java's JNI (Java Native Int
by flohofwoe 12y ago
I think he's mostly talking about the Android NDK (Native Development Kit), which is required for C/C++ development and makes use of Java's JNI (Java Native Interface). On the Java side everything is nice and shiny, but the NDK is notorious for being hard to setup (especially getting debugging to work is a nightmare), it has a funky non-standard build system, and instead of an executable, a DLL must be created, which is then embedded into an Java application. Also, for all somewhat high-level features, the native code must call back into Java because most of the Android APIs are not mapped to C. All this is as far removed from a standard GCC style cross-compiling toolchain as possible, and a lot of work to integrate into an existing engine (and every couple of NDK versions something in their build system will change and the engine build system integration must be fixed up.
- izacus 12y ago"Funky non-standard build system"?! While you do have the ndk-build script, NDK is just GCC (or clang, they're both included) preconfigured for cross-compiling. You can easily use ANY C/C++ build system with it, just set CC, CXX, LD, etc. environment variables to point to the GCC build in NDK folders. That way you can practically compile anything from Linux (which uses only available libc calls), not the least ffmpeg, openssl, curl, whatever you need. The JNI rules are exactly the same as JNI rules are for any desktop Java app that uses native code. There is nothing special or "funky" in NDK - it's all standard stuff you know from Linux if you ever used Java. I'm noticing incredible amount of issues people have (at least in my sample helping them out in Freenode/#android-dev) due to not understanding this simple fact that NDK is just GCC and simply not understanding ANYTHING about how C/C++ app compiling works or not willing to learn basics of how JNI works.
- duaneb 12y agoI think he was referring to the build scripts and ecosystem, not the compiler.
- flohofwoe 12y agoThe compiler tools are fine, the problems are: (1) ndk-build scripts instead of Makefiles (2) C++ headers not in standard locations, (3) the Java build stuff which is still needed to build the final APK (ant, maven, gradle or whatever it is at the moment). All of this together qualifies as a 'funky non-standard build-system' in my book ;)