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

Aplication compiles fine but not working on android.



  • Good afternoon,

    I work on a linux computer with Qt5.3 trying to make an ap that puts bluetooth on in android.
    The compilation of the simple program works without problem, but when i try to put the "QBluetoothLocalDevice" on i get the next application error:
    @
    W/dalvikvm(20368): JNI WARNING: DeleteLocalRef(0x40593d68) failed to find entry (valid=1)
    D/dalvikvm(20368): GetMethodID: method not found: Ljava/lang/RuntimeException;.getScanMode:()I
    D/dalvikvm(20368): GetMethodID: method not found: Ljava/lang/RuntimeException;.enable:()Z
    @
    And when i try it again i get this application error:
    @
    W/dalvikvm(20368): JNI WARNING: DeleteLocalRef(0x405974f0) failed to find entry (valid=1)
    W/System.err(20368): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
    W/System.err(20368): at android.os.Handler.<init>(Handler.java:121)
    W/System.err(20368): at android.bluetooth.BluetoothAdapter$1.<init>(BluetoothAdapter.java:1109)
    W/System.err(20368): at android.bluetooth.BluetoothAdapter.<init>(BluetoothAdapter.java:1109)
    W/System.err(20368): at android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.java:436)
    W/System.err(20368): at dalvik.system.NativeStart.run(Native Method)
    @
    Can someone see what i am doing wrong?

    I tried just the simple example in "the documentation":http://qt-project.org/doc/qt-5/qtbluetooth-overview.html
    I set the manifest so it would accept changes with the bluetooth.

    thanks for any help,
    VinLin


Log in to reply