Android crashes on compiling
-
wrote on 13 Jan 2015, 04:18 last edited by
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.
-
wrote on 13 Jan 2015, 04:21 last edited by
If your porting your application on Mac it don't look the same on Windows etc. And on Linux appearance will be another too
-
wrote on 13 Jan 2015, 12:30 last edited by
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)
-
wrote on 13 Jan 2015, 14:24 last edited by
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? -
wrote on 13 Jan 2015, 15:26 last edited by
[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.
-
wrote on 13 Jan 2015, 15:39 last edited by
To onek24:
perhaps u are right, I don't investigated this problem profoundly
-
wrote on 13 Jan 2015, 16:14 last edited by
[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.
-
wrote on 13 Jan 2015, 16:34 last edited by
thanks
it's useful informationI 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.
-
wrote on 13 Jan 2015, 16:39 last edited by
[quote author="Subst27" date="1421166886"]thanks
it's useful informationI 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.htmlThese two classes are providing you a bunch of informations about the screen including the pixelDensity.
-
wrote on 13 Jan 2015, 16:50 last edited by
It's well known for me :)
13/13