本文已被:浏览 2483次 下载 4241次
Received:October 31, 2017 Revised:November 27, 2017
Received:October 31, 2017 Revised:November 27, 2017
中文摘要: Android Java应用程序(APP)运行时需依赖Dalvik虚拟机环境,从而影响APP的性能表现.C/C++程序具有极好的硬件适应能力,但不能直接开发Android APP.针对该问题,利用Dalvik虚拟机支持JNI (Java Native Inter-face)调用的特点,设计了基于Qt的Android APP C/C++开发方法框架体系,给出了框架的详细工作机制和解决方案,系统总结了利用C/C++开发Android APP的主要过程和步骤.最后,以Android版机械CAD导教APP的开发工作为例,验证了方法的有效性和可行性,为直接利用C/C++开发Android APP提供了一种新途径.
中文关键词: Android应用程序 Qt开发框架 C/C++编程语言 Java本地接口 开发方法实践
Abstract:Android Software Development Kit (SDK), a collection of Android tools, is an effective Java-based kit to develop Android APPlication (APP). However, Android APP's performance is usually limited by the backend Dalvik virtual machine environment. A novel practical model that Android APP developed by C/C++ codes is proposed, because Java Native Interface (JNI) can support C/C++ dynamic library callback mechanism. This paper firstly analyzes and compares the characters between the general development mode for Android APP and Qt cross-platform development framework, and presents a novel principle and a technical relationship between Android APP and Qt framework. Then, it describes the main processes, abstract implementation steps, and software list for the solution. Finally, the development of a sample APP, Mechanical CAD Teaching Assistant, is given as an example to verify the effectiveness and feasibility of the development pattern. This work provides a new way to use C/C++ programming language to develop APPs running on Android operating system.
keywords: Android application Qt development framework C/C++ programming language Java Native Interface (JNI) development pattern and its application
文章编号: 中图分类号: 文献标志码:
基金项目:中央高校基本科研业务费专项资金(Z109021423);农业部现代农业装备重点实验室开放课题(201603002);国家自然科学基金(51302221);西北农林科技大学校教学改革项目(JY1504046);国家重点研发计划专项(2017YFD0502000)
引用文本:
闫锋欣,牛子杰,杜烁炜,潘天丽.基于Qt的Android应用程序C/C++开发方法与实践.计算机系统应用,2018,27(7):96-102
YAN Feng-Xin,NIU Zi-Jie,DU Shuo-Wei,PAN Tian-Li.Qt-Based C/C++ Development Pattern and Its Application for Android APP.COMPUTER SYSTEMS APPLICATIONS,2018,27(7):96-102
闫锋欣,牛子杰,杜烁炜,潘天丽.基于Qt的Android应用程序C/C++开发方法与实践.计算机系统应用,2018,27(7):96-102
YAN Feng-Xin,NIU Zi-Jie,DU Shuo-Wei,PAN Tian-Li.Qt-Based C/C++ Development Pattern and Its Application for Android APP.COMPUTER SYSTEMS APPLICATIONS,2018,27(7):96-102