title: Failure to compile Android application
body: <p>I am on a Linux Mint 20.X distro.</p>
  <p>I installed open source Qt Creator by using the <a href="https://www.qt.io/download-qt-installer" rel="nofollow noreferrer">online installer</a> mainly targeting the building native Android applications with C/C++.</p>
  <p>I had no experience with Qt Creator so I spent a couple of days trying to figure out how to install, what version, whether bugs existed in a version etc.</p>
  <p>Since building native Android applications with C++ required the use of Qt Creator which includes many sub-components I realized there would be lots of different configurations and possible incompatibilities between them.</p>
  <p>To start with I am attaching basic information screenshots of my Qt Creator setup:</p>
  <p>About dialog: Based on Qt 5.15.2 (GCC 7.3.1 20180303, Red hat 7.3.1-5 64 bit)</p>
  <p>I am using Oracle Java JDK 16.0.2 64bit but also tried openJDK from the distro's repos.</p>
  <p>Tools-&gt;Options-&gt;Kits:<br />
  <a href="https://i.stack.imgur.com/td9e4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/td9e4.png" alt="Tools-&gt;Options-&gt;Kits" /></a></p>
  <p>In Tools-&gt;Options-&gt;Qt Versions I could see 6.13 in the auto-detected section and 5.12.8 in the manual (maybe a left over from previous installation attempts)</p>
  <p>In Tools-&gt;Options-&gt;Devices-&gt;Android I could see that Java was reported with an OK, SDK location was the one I defined after being prompted by Qt creator during installation, NDK list was /home/manos/Android/sdk/ndk/21.3.6528147. I could see a green tick saying &quot;Android settings are OK (SDK version 5.0, NDK version 21.3.6528147)&quot;</p>
  <p>I created two Android virtual devices at the bottom of the same dialog under the AVD tab and I ticked &amp; installed the SDK platform and APIs for Android 10 &amp; 11 under the SDK tab.</p>
  <p>After installing Qt Creator, I went straight to Tools-&gt;options where I get to download all required components by Qt Creator.</p>
  <p>That went smooth after confirming licenses.</p>
  <p>Next, I created a desktop pc new application which also went smooth ant built without errors.</p>
  <p>I then created my first Android application by following the screenshots below:</p>
  <p>In New project dialog I chose Qt Quick Application - Empty.</p>
  <p>In Project location I named the project folder &quot;new-mobile-app-ARM64-v8a&quot; and create in field value was /home/manos/Projects/Qt-Creator.</p>
  <p>In Define build system dialog I chose qmake.</p>
  <p>In Required Qt version - I chose ver. 6 from the drop down list that contained 5.12, 5.13, 5.14, 5.15 &amp; 6.0.</p>
  <p>In Kit selection dialog I chose ARM64-v8a clang compiler.</p>
  <p>After creating the project I got no errors.
  When trying to build it I got the following error:</p>
  <p><strong>Could not initialize class org.codehaus.groovy.runtime.InvokerHelper</strong></p>
  <p>Full error log:</p>
  <p>FAILURE: Build failed with an exception.</p>
  <ul>
  <li><p>What went wrong:
  Could not initialize class org.codehaus.groovy.runtime.InvokerHelper</p>
  </li>
  <li><p>Try:
  Run with &amp; ndash; stacktrace option to get the stack trace. Run with &amp; ndash; info or &amp; ndash; debug option to get more log output. Run with &amp; ndash; scan to get full insights.</p>
  </li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p>
  </li>
  </ul>
  <p>BUILD FAILED in 326ms
  Building the Android package failed!
  &amp; Ndash; For more information, run this command with &amp; ndash; verbose.</p>
  <ol start="15">
  <li><p>03:49: The process &quot;/home/manos/.programs/qt6/6.1.3/gcc_64/bin/androiddeployqt&quot; exited with code 14.
  Error while building/deploying project new-mobile-app-ARM64-v8a (kit: Android Qt 6.1.3 Clang ARM64-v8a)
  When executing step &quot;Build Android APK&quot;</p>
  </li>
  <li><p>03:49: Elapsed time: 00:02.</p>
  </li>
  </ol>
  <p>Later I noticed that gradle was involved in this error.</p>
  <p>I searched in S.O and found that one of the suggestions was to change the
  distributionUrl value to another version greater than 6.3. Mine was 5.6.4.
  I went to <a href="https://gradle.org/releases/" rel="nofollow noreferrer">https://gradle.org/releases/</a> and saw that the latest was 7.2
  So I tried:
  distributionUrl=HTTPS://services.gradle.org/distributions/gradle-7.2-bin.zip</p>
  <p>I tried to build again and I got this error:</p>
  <p><strong>Execution failed for task ':processDebugManifest'.</strong></p>
  <p>Full error log:</p>
  <p>FAILURE: Build failed with an exception.
  Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.</p>
  <p>You can use ' &amp; ndash; warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.</p>
  <p>See <a href="https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings" rel="nofollow noreferrer">https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings</a>
  9 actionable tasks: 9 executed</p>
  <ul>
  <li><p>What went wrong:
  Execution failed for task ':processDebugManifest'.
  Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not &quot;opens java.io&quot; to unnamed module @289b717</p>
  </li>
  <li><p>Try:
  Run with &amp; ndash; stacktrace option to get the stack trace. Run with &amp; ndash; info or &amp; ndash; debug option to get more log output. Run with &amp; ndash; scan to get full insights.</p>
  </li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p>
  </li>
  </ul>
  <p>BUILD FAILED in 701ms
  Building the Android package failed!
  &amp; Ndash; For more information, run this command with &amp; ndash; verbose.</p>
  <ol start="15">
  <li><p>14:59: The process &quot;/home/manos/.programs/qt6/6.1.3/gcc_64/bin/androiddeployqt&quot; exited with code 14.
  Error while building/deploying project new-mobile-app-ARM64-v8a (kit: Android Qt 6.1.3 Clang ARM64-v8a)
  When executing step &quot;Build Android APK&quot;.</p>
  </li>
  <li><p>14:59: Elapsed time: 00:02.</p>
  </li>
  </ol>
  <p>Even though I searched I could not find any simple solution.</p>
  <p>I tried a few different combinations of qt versions &amp; kits when creating a new project.
  I always got the same error.</p>
  <p>I have been struggling to make this work for at least 2 full days.</p>