Bad Parsing of AVD API Level

  • Output of sdkmanager contains the following two lines:

    Target: Google APIs (Google Inc.)
    Based on Android 5.0.1 (API level 21)

    The parsing source code androidConfig::androidVirtualDevices() (androidconfigurations.cpp) is :

    if (line.contains(QLatin1String("Target:"))) {
        int lastIndex = line.lastIndexOf(QLatin1Char(' '));
        if (lastIndex == -1) // skip line
        QString tmp = line.mid(lastIndex).remove(QLatin1Char(')')).trimmed();
        if (tmp == QLatin1String("L")) // HACK for android-L preview
            dev.sdk = 20;
            dev.sdk = tmp.toInt();

    The dialog show avd target s API0 even if the real api level is 21.

    [edit: Corrected coding style SGaist]

  • Lifetime Qt Champion


    Which version of Qt Creator is it ?

  • @SGaist
    I have installed QTCreator 3.3.1 but the code is like that even in the master branch.


Log in to reply

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