我在寻找的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文档。 (http://java.sun.com/docs/books/jni/)而Android NDK基本上只是JNI。但在Android NDK,如果你相应的命名你的函数不需要特殊的头神奇。
Try to read through the "standard" JNI documentation. (http://java.sun.com/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++
上一篇:在$ P $ L页的Android大号海拔的影响(仅在使用高度属性)大号、海拔、属性、高度
下一篇:错误在启动Android模拟器:FB :: flushWindowSurfaceColorBuffer:窗口句柄为0x4未找到句柄、模拟器、未找到、窗口