Qt and Android API 26
-
wrote on 3 Jul 2018, 14:36 last edited by
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?
-
wrote on 3 Jul 2018, 15:55 last edited by
Just installed API level 26 and tried build application with it. Got error
BUILD FAILED
/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: 139But 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????
-
Just installed API level 26 and tried build application with it. Got error
BUILD FAILED
/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: 139But 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????
Lifetime Qt Championwrote on 4 Jul 2018, 05:01 last edited by aha_1980 7 Apr 2018, 06:37@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 Can't you use a newer version than 5.6.1?
Also, you seem to use Ant as build tool you should use Gradle.wrote on 4 Jul 2018, 12:26 last edited by Gourmet 7 Apr 2018, 12:27@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.
-
@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.
-
@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.
wrote on 4 Jul 2018, 13:35 last edited by@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.
-
wrote on 4 Jul 2018, 17:09 last edited by
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.
-
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.
-
@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 said in Qt and Android API 26:
there were never been said about gradle should be used.
@Gourmet said in Qt and Android API 26:
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. -
@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.
wrote on 5 Jul 2018, 10:30 last edited by@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.
-
wrote on 11 Jul 2018, 17:12 last edited by Gourmet 7 Nov 2018, 17:13
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.
-
wrote on 12 Jul 2018, 09:52 last edited by
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.
1/12