[android开发] Android手机内存管理与性能优化

[复制链接]
发表于 2022-11-29 10:52:20
1.何谓JNIJNI,从Java1.1开始,JavaNativeInterface(JNI)规范成为java平台的一部分,它许可Java代码和其他语言写的代码进行交互。JNI一开始是为了本地已编译语言,尤其是C和C++而设计的,可是它并不阻碍你使用其他语言,只需调用约好受支持就可以了。使用java与本地已编译的代码交互,通常会损失平台可移植性。可是,部分状况下这样做是可以承受的,乃至是有必要的。例如,使用一些旧的库,与硬件、操作系统进行交互,或许为了提升程序的功能。JNI规范至少确保本地代码能工作在任何Java虚拟机环境下。2.何谓NDKAndroidNDK是在SDK前面又加上了“原生”二字,即NativeDevelopmentKit,因而又被Google称为“NDK”。众所周知,Android程序运行在Dalvik虚拟机中,NDK答使用户使用类似C/C++之类的原生代码语言履行部分程序。NDK包括了:从C/C++生成原生代码库所需求的工具和buildfiles。将共同的原生库嵌入可以在Android设备上部署的使用程序包文件(applicationpackagesfiles,即.apk文件)中。支持一切未来Android平台的一些列原生系统头文件和库。本资料共包括以下附件:

(1. What is JNIJNI? Since Java 1.1, the Java Native Interface (JNI) specification has become a part of the Java platform. It allows Java code to interact with code written in other languages. JNI was originally designed for local compiled languages, especially C and C  , but it does not prevent you from using other languages, just call the ones that are supported. Using java to interact with locally compiled code usually loses platform portability. However, in some cases, it is affordable or even necessary to do so. For example, use some old libraries to interact with hardware and operating systems, perhaps to improve the function of programs. The JNI specification at least ensures that the local code can work in any Java virtual machine environment. 2. What is NDKAndroidNDK? It is also called "NDK" by Google because the word "native" is added in front of the SDK, that is, NativeDevelopmentKit. As we all know, Android programs run in the Dalvik virtual machine. NDK requires users to use native code languages like C/C  to perform some programs. NDK includes tools and buildfiles required for generating native code libraries from C/C  . Embed the common native library in the application package files (. apk files) that can be deployed on Android devices. A list of native system header files and libraries supporting all future Android platforms. This document includes the following annexes:)

[下载]10522065908.rar




上一篇:achartengine-1.0.0
下一篇:Android手机内存管理与性能优化视频教程

使用道具 举报

Archiver|手机版|小黑屋|吾爱开源 |网站地图

Copyright 2011 - 2012 Lnqq.NET.All Rights Reserved( ICP备案粤ICP备14042591号-1粤ICP14042591号 )

关于本站 - 版权申明 - 侵删联系 - Ln Studio! - 广告联系

本站资源来自互联网,仅供用户测试使用,相关版权归原作者所有

快速回复 返回顶部 返回列表