我在寻找的NDK图书馆参考文献,谁知道在哪里可以找到他们呢?不是Java的API。我找不到任何在NDK目录或网上。
I'm looking for reference documentation for the NDK libraries, anyone know where to find them? not java APIs. I can't find any in the NDK directory or online.
推荐答案是的NDK的API文档是很稀疏。大多数docmentation是在NDK本身的文档文件夹中。还实施例是有益的。
Yes the API documentation of the NDK is very sparse. Most of the docmentation is in the docs folder of the NDK itself. Also the examples are helpful.
试着读通过标准的JNI文档。 (java.sun/docs/books/jni/)而Android NDK基本上只是JNI。但在Android NDK,如果你相应的命名你的函数不需要特殊的头神奇。
Try to read through the "standard" JNI documentation. (java.sun/docs/books/jni/) The Android NDK is basically just JNI. But the Android ndk does not need the special header magic if you name your function accordingly.
例如:
Java类:
package com.example.foo; class Bar { native void jnistuff(); }
在您调用jnistuff的NDK将寻找方法:
where you call jnistuff the NDK will look for the method:
void Java_com_example_foo_Bar_jnistuff(JNIEnv* env, jobject *self) { [...] }和自动调用它。不要忘了外部C,如果你使用C ++
and automatically call it. Do not forget "extern C" if you use C++
更多推荐
NDK API参考文档?
发布评论