Can't create bar file - Error preparing application descriptor file



  • I followed all steps of how to configure BlackBerry 10 NDK with QtCreator 2.6.1 but I can't create bar package. Building the app works fine, but when I try to run or deploy it, I receive this error

    @Error preparing application descriptor file
    Error while building/deploying project untitled (kit: BlackBerry 10 arm)
    When executing step 'Create BAR packages'@

    What's the problem here ?



  • Show us your bar-descriptor.xml file. If there is no such file then it is your problem.



  • @<?xml version='1.0' encoding='utf-8' standalone='no'?>
    <qnx >
    <id>com.example.czc</id>
    <name>zczcz</name>
    <versionNumber>1.0.0</versionNumber>
    <description>zcxcxzc</description>
    <initialWindow>
    <systemChrome>none</systemChrome>
    <transparent>false</transparent>
    <autoOrients>true</autoOrients>
    <aspectRatio>landscape</aspectRatio>
    </initialWindow>
    <env value="app/native/imports" var="QML_IMPORT_PATH"/>
    <env value="app/native/plugins:/usr/lib/qt4/plugins" var="QT_PLUGIN_PATH"/>
    <env value="app/native/lib:/usr/lib/qt4/lib/" var="LD_LIBRARY_PATH"/>
    <action system="true">run_native</action>
    <asset path="untitled" type="Qnx/Elf" entry="true">untitled</asset>
    <asset path="%SRC_DIR%/qml">qml</asset>
    </qnx>
    @

    !http://i.imgur.com/K0XOR.png?1?4883(bar-desc)!



  • It looks like some lines are missing your file and I think they are important (not sure). I would recommend running package building from command line: http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10#97454c0726341cf8ad42e1e97a316b2e . I believe you will get more detailed error message than you see now (I hope).

    On unrelated note: do not use autoOrients since there is bug in NDK (see http://qt-project.org/forums/viewthread/22712/).

    @<?xml version='1.0' encoding='utf-8' standalone='no'?>
    <qnx >
    <id>com.example.czc</id>
    <name>zczcz</name>
    <versionNumber>1.0.0</versionNumber>
    <description>zcxcxzc</description>
    <initialWindow>
    <systemChrome>none</systemChrome>
    <transparent>false</transparent>
    <!--
    XXX: Do not use while auto-orientation not fixed
    <autoOrients>true</autoOrients>
    <aspectRatio>landscape</aspectRatio>
    -->
    <autoOrients>false</autoOrients>
    <aspectRatio>portrait</aspectRatio>
    </initialWindow>
    <env value="app/native/imports" var="QML_IMPORT_PATH">
    <env value="app/native/plugins:/usr/lib/qt4/plugins" var="QT_PLUGIN_PATH">
    <env value="app/native/lib:/usr/lib/qt4/lib/" var="LD_LIBRARY_PATH">

    &lt;!-- These are missing in your file --&gt;
    <arg>-platform</arg>
    <arg>blackberry</arg>
    <author>zczczc</author>
    <authorId>gY</authorId>
    
    <action system="true">run_native</action>
    <asset path="untitled" type="Qnx/Elf" entry="true">untitled</asset>
    <asset path="%SRC_DIR%/qml">qml</asset>
    

    </qnx>
    @



  • Even with these missing arguments it doesn't even start creating bar package. I looked at QtCreator source and this error leads to null value returned for qtVersion variable. Something is wrong with the kit. I forgot to mention that I'm using latest Gold NDK

    @bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDescriptorPath, QTemporaryFile *preparedFile)
    173
    {
    174
    BlackBerryQtVersion *qtVersion = dynamic_cast<BlackBerryQtVersion *>(QtSupport::QtKitInformation::qtVersion(target()->kit()));
    175
    if (!qtVersion) {
    176
    raiseError(tr("Error preparing application descriptor file"));
    177
    return false;
    178
    }@



  • I'm using Gold Native SDK as well (I'm working under Ubuntu). Maybe your installation is corrupt, maybe you have Qt installed on system and that conflicted somehow with Blackberry Qt (while I guess you would end up having problems earlier)? As I have said try building package from command line if compilation works without problems.



  • Gold NDK is not corrupted for sure, I'm working with Momentics without problem. I tried with other kit 4.8.3 for PlayBook and packaging works.

    @QtSupport::QtKitInformation::qtVersion(target()->kit()@ returns null for Gold NDK kit, but I don't know why, everything is set-up by following the guide.



  • I would still not reject installation problem - if some parts are working that might happen simply because they are not corrupted. I personally don't have problems neither building from command line nor from QtCreator so I really doubt that there is problem.

    It looks like QtSupport::QtKitInformation is QtCreator part so building from command line could be temporary workaround until you figure out where the problem is. As well if building from command line will fail for you that will indicate that problem is not in QtCreator (and your QtCreator configuration).



  • Maybe your Kit in Qt Creator is not configured properly and that's all: http://qt-project.org/wiki/Qt-Creator-with-BlackBerry-10#aeb0c0416dc24c861ae55212ae19338b



  • Probably qtversion tab is causing problems, because as stated in the guide it has input box for BlackBerry Native SDK but here in mine case this doesn't exist. And I'm starting qtcreator in same terminal window after executing c:\bbndk\bbndk-env.bat

    !http://i.imgur.com/OYjzf.png?1?7492(kit)!

    !http://i.imgur.com/Rfxar.png?1(qtver)!

    !http://i.imgur.com/rpMGO.png?1(compiler)!



  • That warning in "Qt Versions" tab looks suspicious. Try fixing it first. I don't use BB SDK with Windows so I can't help you further. Maybe somebody else will do.



  • Can't fix that :( It appears each time.



  • Uninstall QtCreator, re-install. Delete all kits/qt versions and re-add again. Now works, Solved :)


Log in to reply
 

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