Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QML+Android+QrSensors



  • Hello!
    I have trouble with Qml Sensors for Andoird

    (I use qt 5.2.0. rc1)

    I wrote some( with and without qml) Android apps, and they worked.
    Now i write Andoid app with sensors (with qml) and i ahve trouble.
    When i deploy this app on desktop - it work. when i try deploy for android (i use samsung nexus and android amulator) a have incorrect app, wich does not want to work.

    Its part of Application output:
    ( full out is "here":http://pastebin.com/qe2NkuDW
    @I/Qt ( 2094): qt start
    W/dalvikvm( 2094): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtMessageDialogHelper'
    D/dalvikvm( 2094): Trying to load lib /data/data/org.qtproject.example.qqqqqqq/lib/libQt5QuickParticles.so 0xb2f66d68
    D/dalvikvm( 2094): Shared lib '/data/data/org.qtproject.example.qqqqqqq/lib/libQt5QuickParticles.so' already loaded in same CL 0xb2f66d68
    D/dalvikvm( 2094): Shared lib '/data/data/org.qtproject.example.qqqqqqq/lib/libQt5QuickParticles.so' already loaded in same CL 0xb2f66d68
    D/dalvikvm( 2094): Trying to load lib /data/app-lib/org.qtproject.example.qqqqqqq-1/libqqqqqqq.so 0xb2f66d68
    D/dalvikvm( 2094): Added shared lib /data/app-lib/org.qtproject.example.qqqqqqq-1/libqqqqqqq.so 0xb2f66d68
    D/dalvikvm( 2094): No JNI_OnLoad found in /data/app-lib/org.qtproject.example.qqqqqqq-1/libqqqqqqq.so 0xb2f66d68, skipping init
    W/Qt ( 2094): kernel\qcoreapplication.cpp:416 (QCoreApplicationPrivate::QCoreApplicationPrivate(int&, char**, uint)): WARNING: QApplication was not created in the main() thread.
    W/dalvikvm( 2094): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtNativeInputConnection'
    W/dalvikvm( 2094): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtExtractedText'
    W/dalvikvm( 2094): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtExtractedText'
    D/ ( 2094): HostConnection::get() New Host Connection established 0xb81c3af0, tid 2109
    D/ ( 2094): HostConnection::get() New Host Connection established 0xb81cb440, tid 2094
    F/libc ( 2094): Fatal signal 8 (SIGFPE) at 0xb76eea28 (code=1), thread 2109 (example.qqqqqqq@

    So, it's "red" lines:
    @W/dalvikvm( 2094): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtMessageDialogHelper'
    W/Qt ( 2094): kernel\qcoreapplication.cpp:416 (QCoreApplicationPrivate::QCoreApplicationPrivate(int&, char**, uint)): WARNING: QApplication was not created in the main() thread.
    W/dalvikvm( 2094): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtNativeInputConnection'
    W/dalvikvm( 2094): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtExtractedText'
    W/dalvikvm( 2094): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtExtractedText'@

    What's wrong?

    Thanks

    Peter



  • It looks like you are using an uninitialized (double) variable.
    Can you check if a simple project (which can be shared with us) still crashes?



  • Hello,
    I downloaded Qt 5.2 for Linux yesterday to test some applications on Android.

    I made a helloworld QML application (Rectangle with a Text and a MouseArea) but It does not work. The app is deployed to the device (tablet) but always fails with almost the same error of this post:

    @
    W/Qt ( 2764): kernel/qcoreapplication.cpp:416 (QCoreApplicationPrivate::QCoreApplicationPrivate(int&, char**, uint)): WARNING: QApplication was not created in the main() thread.
    W/dalvikvm( 2764): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtNativeInputConnection'
    I/SystemProperties( 2764): get key=viewancestor.profile_rendering,def=false
    W/dalvikvm( 2764): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtExtractedText'
    D/gralloc ( 2764): map_buffer: Successfully mapped 0x244000 bytes at address 0x621a3000, SharedFd=302, map_count = 1
    D/libEGL ( 2764): loaded /system/lib/egl/libEGL_VIVANTE.so
    D/ ( 2764): Vivante Driver Version : K2.2.5 - U2.5.15_b2!
    D/libEGL ( 2764): loaded /system/lib/egl/libGLESv1_CM_VIVANTE.so
    D/libEGL ( 2764): loaded /system/lib/egl/libGLESv2_VIVANTE.so
    D/gralloc ( 2764): map_buffer: Successfully mapped 0x244000 bytes at address 0x6b119000, SharedFd=313, map_count = 2
    F/libc ( 2764): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1)

    'org.qtproject.example.holamundo' died.
    @

    I also tried the tutorial of Qt Creator "Creating an Android Application" to implement a Qt Quick application that accelerates an SVG based on the changing accelerometer values, but I get the same error.

    Full output application on Qt Creator is "available here":http://pastebin.com/JKXZQG13

    The enviroment is:

    • Debian GNU/Linux 7.0 64 bits, Qt 5.2.0, Qt Creator 3.0.0
    • Tablet HUAWEI MediaPad 7Lite S7-932u, Android 4.0.3

    The error also appears with Android emulator.

    Could anyone please help me to find out what is wrong?

    Regards

    Antonio



  • I have been working on adroid apps myself and when I started on this gauge project all was well until I started doing layouts. And now the program crashes in Simulator and on my phone.

    Here is the output from Qt Creator....

    Starting remote process.D/dalvikvm( 869): Trying to load lib /data/data/org.qtproject.example.Guage/lib/libgnustl_shared.so 0x4170b810
    D/dalvikvm( 869): Added shared lib /data/data/org.qtproject.example.Guage/lib/libgnustl_shared.so 0x4170b810
    D/dalvikvm( 869): No JNI_OnLoad found in /data/data/org.qtproject.example.Guage/lib/libgnustl_shared.so 0x4170b810, skipping init
    D/dalvikvm( 869): Trying to load lib /data/data/org.qtproject.example.Guage/lib/libQt5Core.so 0x4170b810
    D/dalvikvm( 869): Added shared lib /data/data/org.qtproject.example.Guage/lib/libQt5Core.so 0x4170b810
    D/dalvikvm( 869): Trying to load lib /data/data/org.qtproject.example.Guage/lib/libQt5Gui.so 0x4170b810
    D/dalvikvm( 869): GC_CONCURRENT freed 167K, 13% free 2734K/3112K, paused 73ms+89ms, total 278ms
    D/dalvikvm( 869): Added shared lib /data/data/org.qtproject.example.Guage/lib/libQt5Gui.so 0x4170b810
    D/dalvikvm( 869): No JNI_OnLoad found in /data/data/org.qtproject.example.Guage/lib/libQt5Gui.so 0x4170b810, skipping init
    D/dalvikvm( 869): Trying to load lib /data/data/org.qtproject.example.Guage/lib/libQt5Widgets.so 0x4170b810
    D/dalvikvm( 869): Added shared lib /data/data/org.qtproject.example.Guage/lib/libQt5Widgets.so 0x4170b810
    D/dalvikvm( 869): No JNI_OnLoad found in /data/data/org.qtproject.example.Guage/lib/libQt5Widgets.so 0x4170b810, skipping init
    D/dalvikvm( 869): Trying to load lib /data/data/org.qtproject.example.Guage/plugins/platforms/android/libqtforandroid.so 0x4170b810
    D/dalvikvm( 869): Added shared lib /data/data/org.qtproject.example.Guage/plugins/platforms/android/libqtforandroid.so 0x4170b810
    I/Qt ( 869): qt start
    W/dalvikvm( 869): dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtMessageDialogHelper'
    D/AndroidRuntime( 869): Shutting down VM
    W/dalvikvm( 869): threadid=1: thread exiting with uncaught exception (group=0x41465700)
    E/AndroidRuntime( 869): FATAL EXCEPTION: main
    E/AndroidRuntime( 869): java.lang.UnsatisfiedLinkError: Couldn't load Gauge from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.qtproject.example.Guage-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.qtproject.example.Guage-1, /system/lib]]]: findLibrary returned null
    E/AndroidRuntime( 869): at java.lang.Runtime.loadLibrary(Runtime.java:355)
    E/AndroidRuntime( 869): at java.lang.System.loadLibrary(System.java:525)
    E/AndroidRuntime( 869): at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:240)
    E/AndroidRuntime( 869): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:527)
    E/AndroidRuntime( 869): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:749)
    E/AndroidRuntime( 869): at android.app.Activity.performCreate(Activity.java:5133)
    E/AndroidRuntime( 869): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:108
    E/AndroidRuntime( 869): FATAL EXCEPTION: main
    E/AndroidRuntime( 869): java.lang.UnsatisfiedLinkError: Couldn't load Gauge from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.qtproject.example.Guage-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.qtproject.example.Guage-1, /system/lib]]]: findLibrary returned null
    E/AndroidRuntime( 869): at java.lang.Runtime.loadLibrary(Runtime.java:355)
    E/AndroidRuntime( 869): at java.lang.System.loadLibrary(System.java:525)
    E/AndroidRuntime( 869): at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:240)
    E/AndroidRuntime( 869): at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:527)
    E/AndroidRuntime( 869): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:749)
    E/AndroidRuntime( 869): at android.app.Activity.performCreate(Activity.java:5133)
    E/AndroidRuntime( 869): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    E/AndroidRuntime( 869): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
    E/AndroidRuntime( 869): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
    E/AndroidRuntime( 869): at android.app.ActivityThread.access$600(ActivityThread.java:141)
    E/AndroidRuntime( 869): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
    E/AndroidRuntime( 869): at android.os.Handler.dispatchMessage(Handler.java:99)
    E/AndroidRuntime( 869): at android.os.Looper.loop(Looper.java:137)
    E/AndroidRuntime( 869): at android.app.ActivityThread.main(ActivityThread.java:5103)
    E/AndroidRuntime( 869): at java.lang.reflect.Method.invokeNative(Native Method)
    E/AndroidRuntime( 869): at java.lang.reflect.Method.invoke(Method.java:525)
    E/AndroidRuntime( 869): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
    E/AndroidRuntime( 869): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    E/AndroidRuntime( 869): at dalvik.system.NativeStart.main(Native Method)
    I/Process ( 869): Sending signal. PID: 869 SIG: 9



  • I have been hunting around to see what causes
    "dvmFindClassByName rejecting 'org/qtproject/qt5/android/QtMessageDialogHelper'" to occur. Seems to be a bug that is being worked. I am going to try and do my own isolation because my gauge was working before (before using layouts).


Log in to reply