NDK API参考文档?

编程入门 行业动态 更新时间:2024-10-27 14:28:53
本文介绍了NDK API参考文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在寻找的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参考文档?

本文发布于:2023-11-15 03:40:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1590811.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文档   NDK   API

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!