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

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.
  • S Offline
    S Offline
    Subst27
    wrote on 13 Jan 2015, 04:18 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 13 Jan 2015, 04:21 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 13 Jan 2015, 12:30 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 13 Jan 2015, 14:24 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 13 Jan 2015, 15:26 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 13 Jan 2015, 15:39 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 13 Jan 2015, 16:14 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 13 Jan 2015, 16:34 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 13 Jan 2015, 16:39 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 13 Jan 2015, 16:50 last edited by
                      #13

                      It's well known for me :)

                      1 Reply Last reply
                      0

                      13/13

                      13 Jan 2015, 16:50

                      • Login

                      • Login or register to search.
                      13 out of 13
                      • First post
                        13/13
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved