Qt5.2中的android環境搭建

今天QT5.2的beta版出來了,從其描述文檔來看,支持了android,特意下來試試。
html

New Modules and Nice Goodiesjava

Some of the main new features of Qt 5.2include:android

Qt Bluetooth: supported on Linux with Bluez4.x and Blackberryapache

Qt NFC: supported on Blackberryoracle

Qt Positioning: supported on all platformsusing NMEA data, and using GeoClue on Linux工具

Qt Windows Extras: Integrate with nativecode on Windowsui

Qt Mac Extras: Integrate with native codeon Mac OS Xspa

Qt Android Extras: Integrate with nativecode on Androidcode

Improved time zone and locale support withQTimeZone and QCollatororm

Enhancements to multiple Qt Widgets and anew one, the QKeySequenceEdit class

Animations for QML that can not be blockedby high loads on the main thread

Some new features and mobile specificcontrols for Qt Quick Controls

Accessibility is now fully supported on alldesktop platforms and basic support on Android.

 

For a more detailed list of all newfeatures in Qt 5.2 please have a look at the New Features page in the QtProject wiki.

 

下載安裝Qt5.2

http://download.qt-project.org/development_releases/qt/5.2/5.2.0-beta1/

下載安裝android SDK

http://developer.android.com/sdk/index.html

下載安裝 android NDK

http://developer.android.com/tools/sdk/ndk/index.html

下載安裝 apache ant

http://ant.apache.org/

下載安裝JDK

http://www.oracle.com/technetwork/java/javase/downloads/index.html

 

 

打開Qt Creator,選擇工具-選項-android,配置好剛剛安裝的文件路徑,並點擊【啓動android AVD管理器】

 

點擊  New  新建一個android模擬器,根據本身須要選擇Device

 點擊ok,並選擇剛剛創建的設備,點擊Start啓動,此過程比較慢,耐心等待。

 重啓Qt Creator 已經能夠看到有設備了,咱們檢查構建和運行中構建套件和Qt版本是否正確,確認無誤接下來就能夠創建工程

 

新建一個Qt gui項目,選擇android for arm

或者將之前的工程修改成android的工程:

項目->添加構建套件->選擇合適的編譯工具

編譯完成以後,點擊運行,選擇剛剛創建好的avd,等待許久,就能夠在模擬器中看到程序的運行效果(很是漫長的等待)。

 

相關文章
相關標籤/搜索