Android 2.3 NDK的新特性

This release of the NDK includes many new APIs, most of which are introduced to support the development of games and similar applications that make extensive use of native code. Using the APIs, developers have direct native access to events, audio, graphics and window management, assets, and storage. Developers can also implement the Android application lifecycle in native code with help from the new NativeActivity class. For detailed information describing the changes in this release, read the CHANGES.HTML document included in the downloaded NDK package.

这个版本的NDK包括了很多新的API,可以用于开发更多的游戏或相似的应用程序。通过这些API,开发人员可以直接访问Eventsaudiographicswindowsassetsstorage,也可以利用新的NativeActivity类用本地代码来实现Android应用程序。更多的详细信息可以参考NDK中包含的CHANGES.HTML文档

General notes:

更新包括:

·           Adds support for native activities, which allows you to implement the Android application lifecycle in native code.

增加本地activities的支持,以用于使用本地代码实现Android应用

·           Adds native support for the following:

对以下特性增加本地代码支持:

§  Input subsystem (such as the keyboard and touch screen)

输入部分(例如键盘或触摸屏)

§  Access to sensor data (accelerometer, compass, gyroscope, etc).

传感器数据访问(加速度传感器,方向传感器,陀螺仪等)

§  Event loop APIs to wait for things such as input and sensor events.

用于等待输入和传感器events的事件循环

§  Window and surface subsystem

窗口和surface子系统

§  Audio APIs based on the OpenSL ES standard that support playback and recording as well as control over platform audio effects

基于OpenSL ES标准的音频API,支持平台音效的录音和回放控制

§  Access to assets packaged in an .apk file.

访问.apk文件中的资源

·           Includes a new toolchain (based on GCC 4.4.3), which generates better code, and can also now be used as a standalone cross-compiler, for people who want to build their stuff with ./configure && make. See docs/STANDALONE-TOOLCHAIN.html for the details. The binaries for GCC 4.4.0 are still provided, but the 4.2.1 binaries were removed.

包含了更利于代码生成的新的工具链(基于GCC 4.4.3),可以作为通过./configuremake方式生成代码的开发人员的标准交叉编译工具,在docs/STANDALONE-TOOLCHAIN.html文件中可以找到详细说明。GCC 4.4.0仍然存在,但4.2.1已经被移除。

·           Adds support for prebuilt static and shared libraries (docs/PREBUILTS.html) and module exports and imports to make sharing and reuse of third-party modules much easier (docs/IMPORT-MODULE.html explains why).

增加了预编译静态库和共享库(见docs/PREBUILTS.html文档)的支持,以及模块导入导出的支持,更易于共享和重用第三方的模块。

·           Provides a default C++ STL implementation (based on STLport) as a helper module. It can be used either as a static or shared library (details and usage examples are in sources/android/stlport/README). Prebuilt binaries for STLport (static or shared) and GNU libstdc++ (static only) are also provided if you choose to compile against those libraries instead of the default C++ STL implementation. C++ Exceptions and RTTI are not supported in the default STL implementation. For more information, see docs/CPLUSPLUS-SUPPORT.HTML.

作为辅助模块提供了默认的C++ STL的实现(基于STLport),可以被用于静态库或共享库(详细的使用示例参见sources/android/stlport/README),如果想要代替默认的C++ STL实现,可以编译STLport(静态库或共享库)和GNU libstdc++(只能是静态库)。C++异常和RTTI在默认的STL实现中还没被支持,更多信息可参见docs/CPLUSPLUS-SUPPORT.HTML文件

·           Includes improvements to the cpufeatures helper library that improves reporting of the CPU type (some devices previously reported ARMv7 CPU when the device really was an ARMv6). We recommend developers that use this library to rebuild their applications then upload to Market to benefit from the improvements.

包含了改进的cpufeatures辅助库以用于提供准确的CPU类型(很多使用ARMv6的设备以前被报成了ARMv7 CPU),提醒开发保山,使用这个库需要重新编译应用程序然后上传到应用商店。

·           Adds an EGL library that lets you create and manage OpenGL ES textures and services.

增加了EGL库用于创建和管理OpenGL ES纹理和服务

·           Adds new sample applications, native-plasma and native-activity, to demonstrate how to write a native activity.

增加了新的示例程序native-plasmanative-activity用来演示如何编写本地的activity

·           Includes many bugfixes and other small improvements; see docs/CHANGES.html for a more detailed list of changes.

包含了很多Bug修复和小的提升,更多变更可参见docs/CHANGES.html文档

 

——欢迎转载,转载请注明出处,谢谢——

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值