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. Qt 5.6 with Android Studio (embedded JDK)
Forum Updated to NodeBB v4.3 + New Features

Qt 5.6 with Android Studio (embedded JDK)

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 3.3k 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.
  • L Offline
    L Offline
    luca
    wrote on last edited by
    #1

    Hi all,
    I'm configuring Qt 5.6.2 on my new debian 8 installation.
    I just installed the latest Android Studio 2.3.1 that has JDK embedded on the package.
    Then from the package manager I installed NDK.

    From Qt Creator I configured Android as:

    JDK location:  /home/luca/android-studio/jre
    Android SDK location: /home/luca/Android/Sdk
    Android NDK location: /home/luca/Android/Sdk/ndk-bundle
    

    The problem is when I build, at the end of compilation I get:

    :compileReleaseJava FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':compileReleaseJava'.
    > Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.
    

    In my previous linux system I've never set JAVA_HOME and all worked fine...
    Where do I wrong with Debian?

    Thanks

    Luca

    jsulmJ 1 Reply Last reply
    0
    • L luca

      Hi all,
      I'm configuring Qt 5.6.2 on my new debian 8 installation.
      I just installed the latest Android Studio 2.3.1 that has JDK embedded on the package.
      Then from the package manager I installed NDK.

      From Qt Creator I configured Android as:

      JDK location:  /home/luca/android-studio/jre
      Android SDK location: /home/luca/Android/Sdk
      Android NDK location: /home/luca/Android/Sdk/ndk-bundle
      

      The problem is when I build, at the end of compilation I get:

      :compileReleaseJava FAILED
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':compileReleaseJava'.
      > Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your JAVA_HOME system variable to point to the according directory.
      

      In my previous linux system I've never set JAVA_HOME and all worked fine...
      Where do I wrong with Debian?

      Thanks

      Luca

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @luca said in Qt 5.6 with Android Studio (embedded JDK):

      /home/luca/android-studio/jre

      This is the path to the Java JRE not JDK. JRE does not contain the compiler.
      Change the path, so it points to the JDK.

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

      1 Reply Last reply
      0
      • L Offline
        L Offline
        luca
        wrote on last edited by
        #3

        Then new Android Studio cames with a full JDK and it put all in /jre . It also contains javac ecc...

        1 Reply Last reply
        0
        • L Offline
          L Offline
          luca
          wrote on last edited by
          #4

          Ok, it seems Android Studio embed OpenJDK 8 in its /jre folder but Qt Creator (Qt 5.6.2) can't use it.

          To solve I installed OpenJDK 8 on my system and configured Qt Creator as:

          JDK location:  /usr/lib/jvm/java-1.8.0-openjdk-amd64
          
          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