Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89097

Android build fails with "Gradle version 2.2 is required."

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.12.10, 5.15.1
    • Build System
    • None
    • macOS

    Description

      When building for Android under macOS, the kit as configured out of the box (Qt Creator 4.13.3) produces the build error:

      FAILURE: Build failed with an exception.

      • Where:
        Build file '/Users/nic/Sources/Qt/linotune/build-linotune-Android_Qt_5_12_10_Clang_armeabi_v7a-Debug/android-build/build.gradle' line: 17
      • What went wrong:
        A problem occurred evaluating root project 'android-build'.
        > Failed to apply plugin [id 'com.android.application']
        > Gradle version 2.2 is required. Current version is 4.6. If using the gradle wrapper, try editing the distributionUrl in /Users/nic/Sources/Qt/linotune/build-linotune-Android_Qt_5_12_10_Clang_armeabi_v7a-Debug/android-build/gradle/wrapper/gradle-wrapper.properties to gradle-2.2-all.zip
      • Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

      The suggested workaround works, but having to manually edit this every time a build directory is (re)created is quite annoying.

      If the build indeed depends on gradle version 2.2 specifically, why does the generated gradle-wrapper.properties reference the (presumably auto-detected) currently installed gradle version instead of the (apparently required) gradle-2.2-all.zip?

      If conversely the build would work with newer gradle versions, why is there a strict check against version 2.2 still in there?

      And finally: if a bug has been identified, and a specific fix for it has been identified, shouldn't the bug then simply be fixed? Whatever procedural or governance issue has resulted here in a developer sticking post-hoc patch instructions to the user into the code, instead of simply fixing the code itself? This baffles me.

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            assam Assam Boudjelthia
            linoleo Lino Schraudolph
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes