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:

  1. Run the installer to begin installing Qt 5 on your development platform.
  2. Select the components you need in theSelect Componentsscreen and clickNext.
  3. After the installation is complete, the installer lets you open Qt Creator and the README. Select to open Qt Creator and clickFinish.
  4. 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.

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. MySql 存储过程插入年月日
  2. sqlserverdate时间转换给出不正确的结果?
  3. 使用T-SQL中另一个(非xml)列的值更新XML
  4. 查看 SQL Server 作业(job)运行结果状态
  5. provider:Named Pipes Provider,error:40 -
  6. mysql中将多条记录合并成一行数据进行显
  7. MySQL——delete 和 truncate 以及 drop
  8. sql 对某一列去重及重复个数
  9. 删除重复数据,只保留ID最小的一条数据
  10. linux下使用c++语言对mysql数据库操作