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. Android: Build failed with exception. Could not determine Java version from '11.0.10'
QtWS25 Last Chance

Android: Build failed with exception. Could not determine Java version from '11.0.10'

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
15 Posts 7 Posters 4.7k 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
    electricjared
    wrote on 14 Mar 2021, 00:41 last edited by
    #3

    Thanks for the feedback! This is the compile output.

    e18ae461-3954-4139-bc76-1259d446f1c7-image.png

    Anything specific to check in the project settings?

    1 Reply Last reply
    0
    • E Offline
      E Offline
      electricjared
      wrote on 14 Mar 2021, 15:35 last edited by
      #4

      @SGaist have you experienced this before? Any feedback would be greatly, greatly appreciated!

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 14 Mar 2021, 19:40 last edited by
        #5

        Hi,

        There was an issue in previous versions of Qt Creator with the Java version check that was a bit too restrictive but I think it has been fixed in between.

        Which version are you running ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • E Offline
          E Offline
          electricjared
          wrote on 14 Mar 2021, 20:33 last edited by
          #6

          @SGaist thanks for the reply! Qt 5.15.2
          3c2d93a3-419d-42c7-a199-be0df3ea4c78-image.png

          1 Reply Last reply
          0
          • M Offline
            M Offline
            morte
            wrote on 16 Mar 2021, 18:07 last edited by
            #7

            Anything above Java 8 isn't supported by Android atm.

            E 1 Reply Last reply 20 Mar 2021, 04:18
            1
            • M morte
              16 Mar 2021, 18:07

              Anything above Java 8 isn't supported by Android atm.

              E Offline
              E Offline
              electricjared
              wrote on 20 Mar 2021, 04:18 last edited by
              #8

              @morte thanks for the reply!

              I have tried the official releases of Java: 11.0.10 and 8u281 as well as AdoptOpenJDK 8.0.282.8 and 11.0.10.9

              Think I need to downgrade even further?

              1 Reply Last reply
              0
              • M Offline
                M Offline
                morte
                wrote on 21 Mar 2021, 21:17 last edited by
                #9

                It works with AdoptOpenJDK 8.0.282.8, should also work with other Java 7/8 JDKs.
                What is build output with Java 8?

                E L 2 Replies Last reply 24 Mar 2021, 16:22
                0
                • M morte
                  21 Mar 2021, 21:17

                  It works with AdoptOpenJDK 8.0.282.8, should also work with other Java 7/8 JDKs.
                  What is build output with Java 8?

                  E Offline
                  E Offline
                  electricjared
                  wrote on 24 Mar 2021, 16:22 last edited by
                  #10

                  @morte
                  83670187-6fa1-4f9e-8f4f-ad7fd9e9e579-image.png

                  Thank you for the help!

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    morte
                    wrote on 24 Mar 2021, 19:07 last edited by morte
                    #11

                    Maybe something wrong with 'Compilers', it sometimes become broken after replacing JDK and Android SDK, NDK.

                    Working configuration looks something like that (don't mind NDK version on screenshot - 21.4, it also works with 21.3):
                    options-compilers.png

                    If problem with 'Compilers' and Re-detcting won't help, if you don't have any valuable settings, you can delete whole Qt Creator settings, located at C:\Users%USERNAME%\AppData\Roaming\QtProject or only "toolchains.xml" file. Qt Creator recreates those on startup.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mike_W
                      wrote on 3 Jan 2022, 19:52 last edited by
                      #12

                      I'd like to know if anyone has a follow up on this. I also have this problem but only on projects built with QML. Projects built with QWidgets and C++ build beautifully on Android, Armbian and Windows Desktop without no changes to the underlying code.

                      In addition I see this warning the the Android Build Settings underneath the Build directory:

                      Could not parse Makefile. The build will be overwritten.
                      

                      I've looked at the Makefile and can't see the problem.

                      Sorry to dig up an old topic but this one exactly describes my problem for QML builds.

                      1 Reply Last reply
                      1
                      • K Offline
                        K Offline
                        kgregory
                        wrote on 31 Jan 2022, 04:08 last edited by
                        #13

                        I'm having this problem too. It only happens on my "Release" build configurations. I don't get it when I configure for "Debug".

                        Has anyone else figured out how to resolve this?

                        K 1 Reply Last reply 31 Jan 2022, 04:17
                        0
                        • K kgregory
                          31 Jan 2022, 04:08

                          I'm having this problem too. It only happens on my "Release" build configurations. I don't get it when I configure for "Debug".

                          Has anyone else figured out how to resolve this?

                          K Offline
                          K Offline
                          kgregory
                          wrote on 31 Jan 2022, 04:17 last edited by
                          #14

                          @kgregory OK I'm noticing that this happens when I do "sign package" whether I'm in Debug or Release mode. I also get a warning on the GUI that says "Signing a debug package" in both modes.

                          1 Reply Last reply
                          0
                          • M morte
                            21 Mar 2021, 21:17

                            It works with AdoptOpenJDK 8.0.282.8, should also work with other Java 7/8 JDKs.
                            What is build output with Java 8?

                            L Offline
                            L Offline
                            leonopulos
                            wrote on 27 Sept 2024, 11:30 last edited by
                            #15

                            @morte This solution helped me.
                            I downgraded to 8 and everything compiled.

                            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