Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Qt and Android API 26

    Mobile and Embedded
    3
    12
    2944
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Gourmet 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?

      1 Reply Last reply Reply Quote 0
      • G
        Gourmet 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: 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????

        jsulm 1 Reply Last reply Reply Quote 0
        • jsulm
          jsulm Lifetime Qt Champion @Gourmet last edited by aha_1980

          @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.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          G 1 Reply Last reply Reply Quote 1
          • G
            Gourmet @jsulm 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.

            jsulm raven-worx 2 Replies Last reply Reply Quote 0
            • jsulm
              jsulm Lifetime Qt Champion @Gourmet last edited by

              @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.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              G 1 Reply Last reply Reply Quote 0
              • G
                Gourmet @jsulm 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.

                1 Reply Last reply Reply Quote 0
                • G
                  Gourmet 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.

                  jsulm 1 Reply Last reply Reply Quote 0
                  • jsulm
                    jsulm Lifetime Qt Champion @Gourmet last edited by

                    @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.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    G 1 Reply Last reply Reply Quote 0
                    • raven-worx
                      raven-worx Moderators @Gourmet last edited by

                      @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.

                      See Android Getting started

                      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.

                      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                      If you have a question please use the forum so others can benefit from the solution in the future

                      1 Reply Last reply Reply Quote 2
                      • G
                        Gourmet @jsulm 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.

                        1 Reply Last reply Reply Quote 0
                        • G
                          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.

                          1 Reply Last reply Reply Quote 0
                          • G
                            Gourmet 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 Reply Last reply Reply Quote 1
                            • First post
                              Last post