8

What is a working combination of versions of the development tools if I want to develop C++ Qt Android apps? I tried several combinations but they all fail with strange build errors of a simple Hello World test app.

Currently, I have

  • Qt Creator 4.2.1 (based on Qt 5.8.0, MSVC 2015, 32bit)
  • JDK 10.0.1
  • Android SDK 24.4.1-win
  • Android NDK r10e
  • Apache ant 1.9.11

but e.g. that fails with

Buildfile: build.xml does not exist!
Build failed
Warning: Android platform 'android--1' does not exist in SDK.
Building the android package failed!
  -- For more information, run this command with --verbose.
21:35:44: Der Prozess "C:\EigeneDateien\bin\Qt-5.8.0\5.8\android_armv7\bin\androiddeployqt.exe" wurde mit dem Rückgabewert 14 beendet.

I want to use an open source version.

Please, give a list of tools with correct version numbers and maybe download links.

falkb
  • 1,294
  • 11
  • 35
  • 1
    JDK 10 won't work, use no later than JDK 8. You do not need Apache ant, else seems OK. have a look at a working combination [here](https://stackoverflow.com/questions/48189272/qt-creator-android-error-platform-sdk-installed/48348201#48348201) – Mohammad Kanan May 10 '18 at 20:00
  • Which one, 8u171 or 8u172? I can see them here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html – falkb May 10 '18 at 20:43
  • The error stays the same with 8u172 – falkb May 10 '18 at 21:10
  • I don't know how to create 'android--1' and what it means at all – falkb May 10 '18 at 21:34
  • 1
    [android-platform in Qt Creator](https://stackoverflow.com/questions/28684857/how-can-i-change-the-android-platform-in-qt-creator-to-not-be-android-1-in-de?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa) – Mohammad Kanan May 10 '18 at 21:37
  • 1
    The latest Qt (5.10.1) and QtCreator (4.6.1), together with Java 8 and the latest SDK/NDK works perfectly fine. Try building one of the example projects from Qt first, to make shure it not working is not your apps fault. – Felix May 11 '18 at 15:36
  • @Felix They do not offer a download link for Qt-5.10.1 for Android. See here: https://www.qt.io/download-qt-installer How can I get that latest version for Android? They autodetect my Windows and just offer me the installer for Windows. – falkb May 14 '18 at 21:09
  • 1
    Use the online installer, where you can select which version of Qt you want to install – Felix May 14 '18 at 21:30

1 Answers1

3

The good procedure is to use Qt's online installer (https://www.qt.io/download-qt-installer), get the latest version of QtCreator/Qt, then the latest version of ndk/sdk/jdk and cross your fingers because it does not always work...

I fighted a bt with this in early 2019 and here is a combination that perfectly works for me since then, under Windows 7 and 10.

  • QtCreator 4.8.0, based on Qt 5.12.0. I got it from the online installer by then and archived it, but you can apparently specifically download it from here.

  • NDK r18b

  • JDK 1.8.0_201, can be dowaloaded from this page (find jdk-8u201-windows-x64.exe)

  • Android SDK command line tools "sdk-tools-windows-4333796", available here. Then used sdkmanager to download API platform-tools and android-28. Try sdkmanager "platform-tools" "platforms;android-28"

No need for ant anymore, QtCreator will download and use gradle silently.

jpo38
  • 20,821
  • 10
  • 70
  • 151