[Tutorial] How to use Qt Creator for mobile development - Android [Updated Feb/2015]

Welcome!!

In this tutorial, I’m going to show you how to use Qt Creator(now on 5.4) with Android.

I - Requirements

You can read more about this requirements here

In order to use Qt for Android, you need the following:

You need to have the PATHs configured, to Qt be able to use Android tools and Java compiler.

The requirement process can be annoying, but you can find tutorials about it almost everywhere. If you have problems, just comment.

If you have never used Android SDK, you must to download at least one android API. To do it:

  • open your Android SDK folder
  • open tools folder(inside SDK folder)
  • run the file android(or android.bat on Windows)
  • In the screen bellow, select one Android API(Android 4.4.2 in my case), and click in the button Install * packages…

Now, you are able to start!!

II - Installing Qt for Android

Qt 5.4 Highlights:

Let’s start the installation. Go to Qt Project website and download the Qt for Android.

Click in the button View All Downloads to find others packages.

Select you platform, download and install Qt 5.4 for Android.

III - Configuration

Open the Qt Creator, and go to Tools -> Options… -> Android and fill the required fields, like SDK, NDK, JDK and Ant PATH. If you want to, you can manage your devices in the same screen, selecting a real one or configuring a virtual one.

Configure Qt for Android

IV - Creating your first application

To create a new project, open File -> New File or Project -> Applications -> Qt Quick Application -> Choose,

if everything if fine, you will be able to select Android in this screen.

Creating Android app with Qt Creator

Create the project, and choose Android in build kit selector:

Now, just run your application. If everything is fine, you will be able to select the device(emulator or real one) and run your application.

If you have some problem here, just comment that I you try to help you.

I’m going to create more tutorial about Qt for Mobile Development with Android, so keep connected with the blog. I’m going to show you how to create games, application and more.

That’s all, thanks for reading, feel free, just comment your experiences with this tutorial.

Aron Bordin

Aron Bordin
Computer Science Student and AI researcher. Always coding something fun :)

[Tutorial] Developing Android Background Services

### Welcome!In this post, I'll show you how to develop background services on Android Studio. We'll see two type of services: `Service` a...… Continue reading