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 compiling a simple app for Android

Error compiling a simple app for Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 4 Posters 4.0k 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.
  • E Offline
    E Offline
    ElisaRicic
    wrote on 5 Feb 2018, 14:34 last edited by
    #1

    Hi
    I installed Qt 5.10, with Android Studio 3.0.1, jdk 1.8.0.161, sdk 26.1.1 and ndk 15.

    I created a simple project to run on Android for x86.
    In Android Studio I set the correct proxy and port and the same I did for _JAVA_OPTIONS environment variable.

    When I run my application I have the following error:

    FAILURE: Build failed with an exception.

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

    Could not resolve all dependencies for configuration ':classpath'.
    Could not resolve com.android.tools.build:gradle:2.2.3.
    Required by:
    project :
    Could not resolve com.android.tools.build:gradle:2.2.3.
    Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
    Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
    sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    BUILD FAILED

    Total time: 3.045 secs
    Picked up _JAVA_OPTIONS: .....

    Can someone help me to solve this problem?
    Using the browser I have to problem to access to https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3.

    K 2 Replies Last reply 5 Feb 2018, 15:38
    0
    • E ElisaRicic
      5 Feb 2018, 14:34

      Hi
      I installed Qt 5.10, with Android Studio 3.0.1, jdk 1.8.0.161, sdk 26.1.1 and ndk 15.

      I created a simple project to run on Android for x86.
      In Android Studio I set the correct proxy and port and the same I did for _JAVA_OPTIONS environment variable.

      When I run my application I have the following error:

      FAILURE: Build failed with an exception.

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

      Could not resolve all dependencies for configuration ':classpath'.
      Could not resolve com.android.tools.build:gradle:2.2.3.
      Required by:
      project :
      Could not resolve com.android.tools.build:gradle:2.2.3.
      Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
      Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
      sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

      • Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

      BUILD FAILED

      Total time: 3.045 secs
      Picked up _JAVA_OPTIONS: .....

      Can someone help me to solve this problem?
      Using the browser I have to problem to access to https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3.

      K Offline
      K Offline
      koahnig
      wrote on 5 Feb 2018, 15:38 last edited by
      #2

      @ElisaRicic

      Hi and welcome to devnet forum

      AFAIK the recommendation for NDK version 10e is still valid. See below

      Installing the Prerequisites
      In order to use Qt for Android, you need the following:

      The Android SDK Tools
      Note: If your Qt version is earlier than v5.9, use the SDK tools package v25.2.5 or earlier.

      The Android NDK (recommended version 10e)
      Java SE Development Kit (JDK) v6 or later. You can also use OpenJDK on Linux.

      copied from here

      You try downgrading your NDK

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      2
      • E Offline
        E Offline
        ElisaRicic
        wrote on 6 Feb 2018, 07:57 last edited by
        #3

        Thanks fro your replay.
        Even if I use the NDK 10e I still have the same problem.

        1 Reply Last reply
        0
        • E ElisaRicic
          5 Feb 2018, 14:34

          Hi
          I installed Qt 5.10, with Android Studio 3.0.1, jdk 1.8.0.161, sdk 26.1.1 and ndk 15.

          I created a simple project to run on Android for x86.
          In Android Studio I set the correct proxy and port and the same I did for _JAVA_OPTIONS environment variable.

          When I run my application I have the following error:

          FAILURE: Build failed with an exception.

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

          Could not resolve all dependencies for configuration ':classpath'.
          Could not resolve com.android.tools.build:gradle:2.2.3.
          Required by:
          project :
          Could not resolve com.android.tools.build:gradle:2.2.3.
          Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
          Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
          sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

          • Try:
            Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

          BUILD FAILED

          Total time: 3.045 secs
          Picked up _JAVA_OPTIONS: .....

          Can someone help me to solve this problem?
          Using the browser I have to problem to access to https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3.

          K Offline
          K Offline
          koahnig
          wrote on 6 Feb 2018, 09:28 last edited by
          #4

          @ElisaRicic said in Error compiling a simple app for Android:

          A problem occurred configuring root project 'android-build'.

          Could not resolve all dependencies for configuration ':classpath'.
          Could not resolve com.android.tools.build:gradle:2.2.3.
          Required by:
          project :
          Could not resolve com.android.tools.build:gradle:2.2.3.
          Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
          Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom'.
          sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

          You have apparently a problem with the certificate.

          What OS are you using for cross-compilation?

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0
          • E Offline
            E Offline
            ElisaRicic
            wrote on 8 Feb 2018, 07:47 last edited by
            #5

            I'm using Win7.

            Gojir4G 1 Reply Last reply 6 Sept 2018, 14:45
            0
            • E ElisaRicic
              8 Feb 2018, 07:47

              I'm using Win7.

              Gojir4G Offline
              Gojir4G Offline
              Gojir4
              wrote on 6 Sept 2018, 14:45 last edited by
              #6

              @ElisaRicic Hi,

              This solution from stack overflow solved the issue for me.
              It consists to add maven repository in the gradle file, after having created a template in QtCreator project.

              buildscript {
                  repositories {
                      jcenter()
                      maven { url "http://jcenter.bintray.com"}
                  }
                  //...
              }
              
              1 Reply Last reply
              2
              • J Offline
                J Offline
                Josep
                wrote on 1 Nov 2024, 21:21 last edited by
                #7

                @Gojir4
                Work thks!

                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