Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Develop for android java issues
Qt 6.12 LTS is out! See what's new in the release blog

Develop for android java issues

Scheduled Pinned Locked Moved Solved General and Desktop
quickandroidmobile
28 Posts 5 Posters 20.1k 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
    Phips04
    wrote on last edited by
    #21

    Yes the combobox was grayed (I set the entries in the xml file via text editor, now I can edit the boxes) and I restarted Qt creator.

    KroMignonK 1 Reply Last reply
    0
    • P Phips04

      Yes the combobox was grayed (I set the entries in the xml file via text editor, now I can edit the boxes) and I restarted Qt creator.

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by KroMignon
      #22

      @Phips04 I know how have written "Java settings are ok", but which JDK version are you using?

      AFAIK, gradle do NOT work with JDK > 11, and recommended version is still JDK 8.

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Phips04
        wrote on last edited by
        #23

        I meant qt Creator says Java settings are ok.
        I didn't remember that version 8 is the recommended one, installed 15.
        I will replace it by 8 now

        KroMignonK 1 Reply Last reply
        0
        • P Phips04

          I meant qt Creator says Java settings are ok.
          I didn't remember that version 8 is the recommended one, installed 15.
          I will replace it by 8 now

          KroMignonK Offline
          KroMignonK Offline
          KroMignon
          wrote on last edited by KroMignon
          #24

          @Phips04 said in Develop for android java issues:

          I didn't remember that version 8 is the recommended one, installed 15.

          Yes, it is no clearly defined ==> https://doc.qt.io/qt-5/android-building.html.
          JDK 8, still recommended for best compatibility, but starting with Qt 5.15 JDK 11 could be used.

          Side note: if you search on internet java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7, all matches you will found will clearly detail the issue. The gradle version is not compatible with the selected JDK.
          For Qt 5.15, the used gradle version is 5.6.4 (just check in <QT_DIR>/5.15.0/android/src/3rdparty/gradle/gradle/wrapper/gradle-wrapper.properties)

          It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

          1 Reply Last reply
          2
          • P Offline
            P Offline
            Phips04
            wrote on last edited by
            #25

            Ok, now finally it works. This is my very basic UI for testing

            QTAndroid4.jpg

            This is the sourcecode:

            import QtQuick 2.15
            import QtQuick.Window 2.15

            Window {
            Rectangle {
            id: rectangle
            color: "#09a4cc"
            anchors.fill: parent

                Rectangle {
                    id: rectangle1
                    x: 220
                    y: 117
                    width: 200
                    height: 200
                    color: "#4facfe"
                    radius: height / 2
                    gradient: Gradient {
                        GradientStop {
                            position: 0
                            color: "#4facfe"
                        }
            
                        GradientStop {
                            position: 1
                            color: "#00f2fe"
                        }
                    }
                }
            }
            

            }

            What it shows is simply a white screen.๐Ÿ™„

            KroMignonK 1 Reply Last reply
            1
            • P Phips04

              Ok, now finally it works. This is my very basic UI for testing

              QTAndroid4.jpg

              This is the sourcecode:

              import QtQuick 2.15
              import QtQuick.Window 2.15

              Window {
              Rectangle {
              id: rectangle
              color: "#09a4cc"
              anchors.fill: parent

                  Rectangle {
                      id: rectangle1
                      x: 220
                      y: 117
                      width: 200
                      height: 200
                      color: "#4facfe"
                      radius: height / 2
                      gradient: Gradient {
                          GradientStop {
                              position: 0
                              color: "#4facfe"
                          }
              
                          GradientStop {
                              position: 1
                              color: "#00f2fe"
                          }
                      }
                  }
              }
              

              }

              What it shows is simply a white screen.๐Ÿ™„

              KroMignonK Offline
              KroMignonK Offline
              KroMignon
              wrote on last edited by
              #26

              @Phips04 I think you have to set property visible to true of top Window:

              import QtQuick 2.15
              import QtQuick.Window 2.15
              
              Window {
                  visible: true // ==> default value is false!
                  Rectangle {
                      id: rectangle
                      color: "#09a4cc"
                      anchors.fill: parent
                    ...
                 }
              }
              

              It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

              1 Reply Last reply
              1
              • P Offline
                P Offline
                Phips04
                wrote on last edited by Phips04
                #27

                Ok, QT creator does not recongnize the property, but it compiles, and now it works the way it should,
                thanks for your help๐Ÿ‘

                KroMignonK 1 Reply Last reply
                1
                • P Phips04

                  Ok, QT creator does not recongnize the property, but it compiles, and now it works the way it should,
                  thanks for your help๐Ÿ‘

                  KroMignonK Offline
                  KroMignonK Offline
                  KroMignon
                  wrote on last edited by
                  #28

                  @Phips04 Your welcome

                  It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

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