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
Highlighted
Contributor
Posts: 15
Registered: ‎08-14-2012
My Device: Blackberry Dev Alpha - Blackberry Playbook
My Carrier: Vodafone
Accepted Solution

Error on running BatterySample of GitHub

Hi,

I've imported BatterySample from GitHub and when I run on Blackberry Dev Alpha Simulator, the QNX Momentics IDE wrote in Console window:

"

bb::cascades::QmlDocument: error when loading QML from: QUrl( "file:///accounts/1000/appdata/com.example.MyApp.testDev_ample_MyAppddd36184/app/native/assets/main.qml" )
--- errors: (file:///accounts/1000/appdata/com.example.MyApp.testDev_ample_MyAppddd36184/app/native/assets/main.qml:2:1: module "bb.device" is not installed
import bb.device 1.0
^)

"

 

But there's "LIBS += -lbbdevice" in .pro file.

What can I do? What's the problem?

 

Thanks

Retired
Posts: 138
Registered: ‎05-11-2012
My Device: Developer
My Carrier: Developer

Re: Error on running BatterySample of GitHub

The suggested import line should be in your QML

 

Graham

Contributor
Posts: 15
Registered: ‎08-14-2012
My Device: Blackberry Dev Alpha - Blackberry Playbook
My Carrier: Vodafone

Re: Error on running BatterySample of GitHub

In my qml there is import BBC.device 1.0.... so, chat can I do?
Developer
Posts: 107
Registered: ‎05-11-2011
My Device: BlackBerry Z10 LE
My Carrier: AirTel

Re: Error on running BatterySample of GitHub

Hi,

 

You must replace this statement   BB.device 1.0  with import bb.cascades 1.0 in main.qml file

Retired
Posts: 138
Registered: ‎05-11-2012
My Device: Developer
My Carrier: Developer

Re: Error on running BatterySample of GitHub

Did these changes solve your problems?

 

Graham

Contributor
Posts: 15
Registered: ‎08-14-2012
My Device: Blackberry Dev Alpha - Blackberry Playbook
My Carrier: Vodafone

Re: Error on running BatterySample of GitHub

I'm sorry, I'm back from vacation. It works now.

Retired
Posts: 138
Registered: ‎05-11-2012
My Device: Developer
My Carrier: Developer

Re: Error on running BatterySample of GitHub

Great news - hope you had a great vacation too :-)

 

Graham

Contributor
Posts: 15
Registered: ‎08-14-2012
My Device: Blackberry Dev Alpha - Blackberry Playbook
My Carrier: Vodafone

Re: Error on running BatterySample of GitHub


gperry wrote:

Great news - hope you had a great vacation too :-)

 

Graham


yes, I have been used to recharge batteries!

Retired
Posts: 138
Registered: ‎05-11-2012
My Device: Developer
My Carrier: Developer

Re: Error on running BatterySample of GitHub

Very appropriate :-)