Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Error trying to build app
Forum Updated to NodeBB v4.3 + New Features

Error trying to build app

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 1 Posters 530 Views
  • 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.
  • P Offline
    P Offline
    Panoss
    wrote on last edited by Panoss
    #1

    I 'm trying to build my app and I get this error:

    :-1: error: Build failed with an exception.

    • Where:
      Build file 'G:\Eggrafa\QtProjects\Android\build-Inventory_1_1-Android_Qt_6_2_3_Clang_x86-Debug\android-build\build.gradle' line: 17

    • What went wrong:
      A problem occurred evaluating root project 'android-build'.

    Failed to apply plugin 'com.android.internal.application'.
    Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
    You can try some of the following options:
    :-1: error: - changing the IDE settings.
    - changing the JAVA_HOME environment variable.
    - changing org.gradle.java.home in gradle.properties.

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

    With the CMD, in dir android-build (G:\Eggrafa\QtProjects\Android\build-Inventory_1_1-Android_Qt_6_2_3_Clang_x86-Debug\android-build), I tried :

    gradlew --version

    and got this:

    JVM 1.8.0_322 (Red hat ...

    833e377c-b4a7-4e87-a442-f4beaf254f33-εικόνα.png

    How can I fix it?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Panoss
      wrote on last edited by Panoss
      #2

      I installed JDK.
      In Tools > Options > Devices > Android at 'JDK Location' I put the path C:\Program Files\Java\jdk-17.0.2.
      I restarted Qt Creator and now I get a differrent error:

      • What went wrong:
        Execution failed for task ':processDebugResources'.
        A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
        Android resource linking failed
        ERROR:G:\Eggrafa\QtProjects\Android\build-Inventory_1_1-Android_Qt_6_2_3_Clang_x86-Debug\android-build\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:21: AAPT: error: attribute android:allowNativeHeapPointerTagging not found.

      ERROR:G:\Eggrafa\QtProjects\Android\build-Inventory_1_1-Android_Qt_6_2_3_Clang_x86-Debug\android-build\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:21: AAPT: error: attribute android:requestLegacyExternalStorage not found.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved