找回密码
 立即注册
android开发 2022-11-09 86 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
开始本篇文章之前我先为我们简单的介绍一下AndroidNDK编程的原理,我们认识Android开发使用JAVA语言来编程它的运行效率要比C/C++低很多,为了让JAVA语言可以调用C/C++这时候NDK就呈现了,使用DNK可以很方便的实现JAVA与C/C++之间的彼此调用。NDK的工作原理是使用谷歌提供的NDK工具将C/C++的代码编译成.so文件,最终使用JAVA代码与.so文件之间彼此调用。下面我先说一下在Unity中结合AndroidNDK实现本地数据的共享的原理,如下图所示,Unity工程参加NDK后工程大致可分为三个部分

(Before starting this article, I will briefly introduce the principle of Android NDK programming. We know that the running efficiency of Android development using JAVA language to program is much lower than that of C/C  . In order to enable JAVA language to call C/C  , NDK will be presented at this time. Using DNK can facilitate the mutual call between JAVA and C/C  . The working principle of NDK is to use the NDK tool provided by Google to compile C/C  code into. so files, and finally use Java code and So files call each other. Let me first describe the principle of sharing local data in Unity with Android NDK. As shown in the figure below, the Unity project can be roughly divided into three parts after participating in NDK)

[下载]14350729392.rar




上一篇:Android模仿iPhone列表数据View刷新动画详解(十九) 文档
下一篇:IOS Android支持中文与本地文件的读取写入(二十七) 文档