Avdmanager "expected a non-null reference"

  • I use Qt Creator 4.4.1 and Qt 5.0.2.
    I want to test my application on android virtual device.
    But avdmanager returns some error "expected a non-null reference".

    How can I solve this problem?

  • Moderators


    Hi and welcome to devnet

    You are using a really old Qt lib version. With Qt5.0 the android version started emerge, but it was not offcially released. IIRC it was released with Qt5.2

    Therefore, I would expect that you are running into a couple of different issues with such an old version. You would probably need to have also the old android studio fitting if it did fit at all.

    My personal recommendation would be to update to a more recent version and start from there. Last year has been a break in continuation of tools in Android studio. I did start once again and compiled some stuff. I had used Qt5.9 and read carefully the descriptions about what are the recommended versions for android sdk and ndk. Simply shooting for the newest versions ended in a number of issues.

  • Oh, sorry for my typo.
    I'm using Qt 5.9.2.

  • Moderators


    That makes more sense.

    It has been a while ago, maybe 6 month, when I probably ran into the same message. You need to check the different settings for avd and Android API levels. While I was doing the trials for getting it to work, some of those parameters seemed to change randomly. Unfortunately I could not find the reasons why and replicate for a bug report.

    Also make sure that you following these rules http://doc.qt.io/qt-5/androidgs.html and pay special attention to recommended versions of Android tools. Mixing with newer versions of Android tools prevented me from succeeding.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.