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 crashes on compiling
Forum Update on Monday, May 27th 2025

Android crashes on compiling

Scheduled Pinned Locked Moved Mobile and Embedded
13 Posts 3 Posters 3.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
    etixpp
    wrote on last edited by
    #1

    Hello i am very new to Android with QT and just configured everything and tried to compile... i use a emulator and it always crashes on 3rth bild step
    i tried android for x86
    android for armeabi v-7a
    android for armeabi
    kit´s and on 5 different diveces. Some devices render but the qt creator crashes and nothing happens, some just dont even get created.

    I get following output:

    http://pastebin.com/FDyB3eJF

    Any suggestions?

    Furthemore it somehow does not recognize x86 devices with x86 toolkit as compatible anymore for some reason, the run before it recognized it right...

    Edit:
    I just saw that i have some build directorys which seem to compile successfull but if i execute the .bat i see the emulation of the smartphone, but nothing happens. It´s in Loadscreen all the time und does not load the programm.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Subst27
      wrote on last edited by
      #2

      about Emulation: I don't know why but in latests SDK emulators don't work correct.
      Some ones tell that just emulator so slowly works.

      To solve the problem I'm use virtual box by Oracle and image for x86 arch of Android. Works fine

      1 Reply Last reply
      0
      • E Offline
        E Offline
        etixpp
        wrote on last edited by
        #3

        Ok think its a emulator problem, i connected it to my phone and it works but the result ist pretty destructive, the margins and height and length of the elements are destroyed, colours of message boxes change, strange layout and so on...

        any suggestions? :D

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Subst27
          wrote on last edited by
          #4

          You build project first for other platform (e.g. Windows). Isn't it?
          And then porting for Android.

          Look: take up some widget, for example QPushButton.
          It has default size 140 x 25 and you got used to that, how it looks on your monitor with resolution for example 1600 x 900.

          But on Androif device resolution is lower, sixe of QPushButton stays the same.
          It's look not beautifully.

          You just must to dynamic solve the comfortable sizes for your widgets elements in code depending on screen resolution or set the sizes beforehand according device you use.

          Color and layout - it's other cases. They defines by Android native style, as I understand. I don't made him out deeply.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Subst27
            wrote on last edited by
            #5

            If your porting your application on Mac it don't look the same on Windows etc. And on Linux appearance will be another too

            1 Reply Last reply
            0
            • E Offline
              E Offline
              etixpp
              wrote on last edited by
              #6

              W/System.err(13605): java.lang.ClassNotFoundException: android.graphics.drawable.RippleDrawable
              W/System.err(13605): at java.lang.Class.classForName(Native Method)
              W/System.err(13605): at java.lang.Class.forName(Class.java:217)
              W/System.err(13605): at java.lang.Class.forName(Class.java:172)
              W/System.err(13605): at org.qtproject.qt5.android.ExtractStyle.getClass(ExtractStyle.java:396)
              W/System.err(13605): at org.qtproject.qt5.android.ExtractStyle.<init>(ExtractStyle.java:100)
              W/System.err(13605): at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:438)
              W/System.err(13605): at java.lang.reflect.Method.invokeNative(Native Method)

              These are some errors i get in the output console while my application is runnung, i am now trying to run a official example (the calculator), everything wents well except the texts overlap on the display side...

              can it be caused by my android phone ? (Android 4.0.3)

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Subst27
                wrote on last edited by
                #7

                look in project setup for such version of android you build project.
                And what api's of android is installed (android sdk)
                And in system variable 'path' all correct?

                1 Reply Last reply
                0
                • O Offline
                  O Offline
                  onek24
                  wrote on last edited by
                  #8

                  [quote author="Subst27" date="1421122720"]You build project first for other platform (e.g. Windows). Isn't it?
                  And then porting for Android.

                  Look: take up some widget, for example QPushButton.
                  It has default size 140 x 25 and you got used to that, how it looks on your monitor with resolution for example 1600 x 900.

                  But on Androif device resolution is lower, sixe of QPushButton stays the same.
                  It's look not beautifully.[/quote]

                  The resolution of most android devices can hold up with monitors. The problem here is the pixel density. In the most cases the pixel density of a smartphone is higher than on a montitor. If you develop on a FullHD monitor and deploy on a FullHD smartphone, the pixel-size shouldn't change, still it might look not native or 'good' because the smartphone has got a higher pixel-density and therefore the real/physical size of the button is smaller.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Subst27
                    wrote on last edited by
                    #9

                    To onek24:

                    perhaps u are right, I don't investigated this problem profoundly

                    1 Reply Last reply
                    0
                    • O Offline
                      O Offline
                      onek24
                      wrote on last edited by
                      #10

                      [quote author="Subst27" date="1421163595"]To onek24:

                      perhaps u are right, I don't investigated this problem profoundly [/quote]

                      Well, this was my experience when i worked with QtQuck apps for android. Thats why i like the working with inches/cm for mobile devices, using this will keep the physical size of the objects constant, no mater what resolution you are using. 7" hd will be the same as 7" full-hd or 7" 4k, the only thing that changes is the sharpness.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Subst27
                        wrote on last edited by
                        #11

                        thanks
                        it's useful information

                        I don't write for android right now. I'm only build functionality toolchain for it and build some tests apps. but in few time may be will be needed to creating full-function application.

                        1 Reply Last reply
                        0
                        • O Offline
                          O Offline
                          onek24
                          wrote on last edited by
                          #12

                          [quote author="Subst27" date="1421166886"]thanks
                          it's useful information

                          I don't write for android right now. I'm only build functionality toolchain for it and build some tests apps. but in few time may be will be needed to creating full-function application.[/quote]

                          You're very welcome.

                          I've got two links which you might want to check out:

                          "Screen QML Type":http://doc.qt.io/qt-5/qml-qtquick-window-screen.html
                          "QScreen Class":http://doc.qt.io/qt-5/qscreen.html

                          These two classes are providing you a bunch of informations about the screen including the pixelDensity.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Subst27
                            wrote on last edited by
                            #13

                            It's well known for me :)

                            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