Nominate our 2022 Qt Champions!

Android ITrustManager.isDeviceLocked(int)'on a null object reference

  • Hello,

    I am trying to make an Android application with new version of QT.
    NDK used : 20
    Java JDK 8
    Qt Creator 4.10.1
    Qt 5.13.1
    Android SDK 28

    Compilation went fine but I faced a problem when launching on the device, the app force quit with this exception:

    java.lang.NullPointerException: Attempt to invoke interface method 'boolean' on a null object reference
        at android.os.Parcel.readException(
        at android.os.Parcel.readException(
        at android.content.IClipboard$Stub$Proxy.hasPrimaryClip(
        at android.content.ClipboardManager.hasPrimaryClip(
        at android.os.Handler.handleCallback(
        at android.os.Handler.dispatchMessage(
        at android.os.Looper.loop(
        at java.lang.reflect.Method.invoke(Native Method)

    Strange thing is that I had no problem launching same project compiled with Qt 5.11

  • I'd try NDK 19 (for me NDK 20 didn't work with Qt 5.12.3)

  • I just tried with NDK 19 or SDK 29 always same problem.
    Even QT Example project didn't work, they compile but don't launch with same exception.

Log in to reply