Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 103
Registered: ‎02-13-2012
My Device: Z10 LE
My Carrier: Rogers
Accepted Solution

Critical error in QML, module "bb.data" is not installed, app will not launch

Hello,

 

I am trying to do something similar to the example here:

https://developer.blackberry.com/cascades/reference/bb__data__xmldataaccess.html

 

I have learned to expect problems with the QML preview, but this error is happening when trying to launch the app on my DevAlpha device!  The exact errors are:

 

Critical: bb::cascades::QmlDocument: error when loading QML from:   QUrl( "file:///apps/com.example.rim/native/assets//main.qml" )  
Critical:   --- errors:  (file:///apps/com.example.rim/native/assets//main.qml:3:1: module "bb.data" is not installed
    import bb.data 1.0
    ^)
Critical: bb::cascades::QmlDocument:createRootObject document is not loaded or has errors, can't create root

 

Note, I HAVE added the -lbbdata to the LIBS in my .pro file, so there should be no reason why the app cannont find bb.data!  Has anyone else seen this problem or discovered a solution?  This is essentially blocking any further progress on my app!

 

Thanks,

Nick

Learn to run and get in shape with Couch 2AnyK Pro, a Built for BlackBerry native Couch to 5K (C25K) app for BlackBerry 10, available in BlackBerry World.
Developer
Posts: 18
Registered: ‎11-08-2012
My Device: Blackberry 10 Dev Alpha B
My Carrier: ??

Re: Critical error in QML, module "bb.data" is not installed, app will not launch

check this one if it is similar problem:

http://supportforums.blackberry.com/t5/Cascades-Development/QTimer-and-qmlRegisterType/td-p/2038545

If you find my post helpful, please click like Smiley Happy
Developer
Posts: 103
Registered: ‎02-13-2012
My Device: Z10 LE
My Carrier: Rogers

Re: Critical error in QML, module "bb.data" is not installed, app will not launch

Hi @vencedor,

 

Thanks for the suggestion.  I tried moving my ListView to another qml file and importing bb.data there, but I still get the same error, it thinks bb.data isn't installed!!

 

I even tried creating a new project and trying this, just in case there was some leftover weirdness from creating my first project with the Beta4 SDK.  I'm using the Gold SDK now.  When I installed the Gold SDK, I uninstalled the Beta4 SDK first, so that should have prevented any install problems from upgrading Momentics and the SDK.

 

So I'm still stuck and at a loss as to what could be causing this error.

 

Nick

 

 

Learn to run and get in shape with Couch 2AnyK Pro, a Built for BlackBerry native Couch to 5K (C25K) app for BlackBerry 10, available in BlackBerry World.
Developer
Posts: 18
Registered: ‎11-08-2012
My Device: Blackberry 10 Dev Alpha B
My Carrier: ??

Re: Critical error in QML, module "bb.data" is not installed, app will not launch

When I first created project using Gold SDK, I had to include more libraries for some of my codes to work.

 

Pls check if you are looking for libbbdata library. It is the library for data access, e.g. JSON, SQL, etc.

If you find my post helpful, please click like Smiley Happy
Developer
Developer
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: Critical error in QML, module "bb.data" is not installed, app will not launch

try including this line in your main:

bb::data:Smiley Very HappyataSource::registerQmlTypes();

 

the release notes say that this has been deprecated in the gold release but it doesnt seem to be the case...i created a new project using the gold sdk, and had the same issue as you did if i used a DataSource class...the above line fixed it!

 

wrong documentation:

https://developer.blackberry.com/cascades/documentation/dev/upgrading/index.html

Developer
Posts: 103
Registered: ‎02-13-2012
My Device: Z10 LE
My Carrier: Rogers

Re: Critical error in QML, module "bb.data" is not installed, app will not launch

Hi @lew,

 

I just wanted to say thanks for your reply.  This is the solution I ended up going with to get past this error.  Looks like that really isn't deprecated yet...

 

Nick

Learn to run and get in shape with Couch 2AnyK Pro, a Built for BlackBerry native Couch to 5K (C25K) app for BlackBerry 10, available in BlackBerry World.
Developer
Posts: 54
Registered: ‎05-23-2012
My Device: Developer
My Carrier: Developer

Re: Critical error in QML, module "bb.data" is not installed, app will not launch

Thanks for the solution. Is there a workaround that allows you to still preview the QML in Momentics Design Mode? It's a bit of a killer having no preview.
----
I know exactly where the problem *might* be.
Highlighted
Developer
Developer
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: Critical error in QML, module "bb.data" is not installed, app will not launch

Not really but you can simply comment out the datasource for previewing