Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt and Android API 26
Google requires after Aug 1 all new apps and after Nov 1 all upgrades must be created with target API level 26 (Android 8.0). I created my apps with target API 23 and Qt 5.6.1 - this works almost excellent. But API 24 and 26 contain many important changes to API 23. Is there information which Qt version corresponds to API 26? What if Qt 5.6.1 app won't work properly in Android 8 because of any internal Qt for Android implementation?
Just installed API level 26 and tried build application with it. Got error
/opt/android-sdk-linux/tools/ant/build.xml:649: The following error occurred while executing this line:
/opt/android-sdk-linux/tools/ant/build.xml:694: null returned: 139
But nothing informative above this. I'm weird... What is wrong? How solve this? Just found QTBUG-61919 with same report. It is not possible create Qt application for Android API level 26????
@Gourmet Can't you use a newer version than 5.6.1?
Also, you seem to use Ant as build tool you should use Gradle.
Gourmet last edited by Gourmet
@jsulm there were never been said about gradle should be used. Ant worked fine before this. Can you show Digia or other recommendations about gradle for API level 26? About Qt version - in QTBUG-61919 the problem with Qt 5.9.1 was reported.
@Gourmet It's not related to Qt - Google switched from Ant to Gradle in their Android SDK. I don't know exactly when this switch was done.
@jsulm looks like on API 25 exactly. I doubt a little - which one Qt version to install. On the "Connecting Android Devices" Qt doc page they say Gradle scripts are delivered with Qt 5.9 and 5.6.3. Are they delivered with Qt 5.10/11? I cant see Gradle in Qt Maintenance package list.
Can't install Qt 5.9.0, 5.9.1, 5.10, 5.11.1 with Maintenance Tool. When installing gcc_64 error with code 1 appears. The sdktool cannot recognize given option or command. Probably sdktool is obsolete but I do not know how properly upgrade it on Linux.
@Gourmet For Android you need to install one of the Android Qt versions (there are two: ARM and x86). Sometimes the tool has problems to contact one of the servers to download the data. You should try later again.
there were never been said about gradle should be used.
I cant see Gradle in Qt Maintenance package list.
and this which says:
Gradle for building application packages for Android devices (APK). Gradle is delivered with Qt 5.9, and later. Because Gradle scripts are not delivered with Android SDK Tools since version 26.0.0, they are delivered with Qt 5.9 and 5.6.3.
Note: Using Ant to build APKs is no longer supported.
@jsulm this is not the problem with servers. While using Maintenance Tool after all files were downloaded the error from sdktool appears. It tells about wrong command or key. But separate kit downloaded manually from Qt servers installs as well. I will write bug report on bug tracker.
Gourmet last edited by Gourmet
I just installed Qt 5.9.6 with Qt Creator 4.6.2. Imported existing working project. When attempting build it I have got error:
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':processReleaseResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt
What goes wrong? I am not familiar with Gradle.
Problem was in old Google build tools version - after upgrade to latest this message gone. But there were some other undocumented issues. Finally I have got working program.