Getting Started with Qt5 for Android
Getting Started with Qt for Android
Requirements
In order to useQt for Android, you need the following:
- The Android SDK Tools
- The Android NDK
- Apache Antv1.8 or later
- Java SE Development Kit(JDK) v6 or later. You can also useOpenJDKon Linux.
- On Windows, you need the following additional installations:
- MinGWv4.8.0 revision 2
- Android Debug Bridge (ADB) driver on the Windows platform to enable USB debugging. The default USB driver on Windows does not allow debugging. For details about how to get the USB driver, seehttp://developer.android.com/sdk/win-usb.html.
After installing the driver, try running a few basicadbcommands and check whether your device responds to it.
Note:You must set theJAVA_HOMEenvironment variable to the JDK install directory path so that Qt Creator finds the binaries required to build your application.
After installing these tools, update the Android SDK to get the API and tools packages required for development. You can update the SDK using theandroidtool that comes with the SDK Tools package. For example, on Ubuntu the following command starts theAndroid SDK Manager, which enables you to select the packages you want to install:
./android update sdk
Installing Qt for Android
The Qt 5 installers for different platforms are available from theDownloadspage. Choose the one that is appropriate.
Note:Enterprise packages are available from theTry Qt Enterprisepage. Qt for Android is also available as part of Qt Mobile Edition, seeqt.digia.comfor details.
Once you have the installer, follow these steps:
- Run the installer to begin installing Qt 5 on your development platform.
- Select the components you need in theSelect Componentsscreen and clickNext.
- After the installation is complete, the installer lets you open Qt Creator and the README. Select to open Qt Creator and clickFinish.
- SelectTools > Options > Androidin Qt Creator to add the Android NDK and SDK paths. For more details, seeQt Creator Manual.
Now you can test your development setup by running the examples that came with the Qt 5 package installed earlier. You can browse the examples in Qt CreatorWelcomemode. Use theandroidfilter in the search field to list all the examples tested on Android.
更多相关文章
- 代码中设置drawableleft
- android 3.0 隐藏 系统标题栏
- Android开发中activity切换动画的实现
- Android(安卓)学习 笔记_05. 文件下载
- Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
- 技术博客汇总
- android 2.3 wifi (一)
- AndRoid Notification的清空和修改
- Android中的Chronometer