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
New Developer
shmily-lu
Posts: 14
Registered: ‎07-17-2012
My Device: 8900 and playbook
My Carrier: CHINA MOBILE
Accepted Solution

Why it's so big?

Hi:

    I had some problems when I use the qt for playbook SDK.

    1.The applications that developed by qr creator is very very big.

        The helloworld example is also 80.2M,

        Why? I don't know that , I'm so confused.

    2.How can I get the *.bar after I finished the application?

 

 

Who could tell me? Thanks a lot.

 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Why it's so big?

>1.The applications that developed by qr creator is very very big.

        The helloworld example is also 80.2M,

        Why? I don't know that , I'm so confused.

probably because you've included all possible Qt libraries, try to compile with only ones that you really need. For example if you don't use networking there is no reason to include QtNetwork library

 

>2.How can I get the *.bar after I finished the application?

Just deploy your app to sim/plabook and .bar file will be created for you.

Please use plain text.
New Developer
shmily-lu
Posts: 14
Registered: ‎07-17-2012
My Device: 8900 and playbook
My Carrier: CHINA MOBILE

Re: Why it's so big?

thanks very much, let me have a try .

Please use plain text.
New Developer
shmily-lu
Posts: 14
Registered: ‎07-17-2012
My Device: 8900 and playbook
My Carrier: CHINA MOBILE

Re: Why it's so big?

I‘m still confused , I haven't included the unuseful libraries , and I checked the application again and again, it also so big. Oh my god. 

Please use plain text.
New Developer
aidinggeer
Posts: 18
Registered: ‎07-23-2012
My Device: blackberry 9000
My Carrier: ATA

Re: Why it's so big?

wishs
Please use plain text.
BlackBerry Development Advisor
smcveigh
Posts: 668
Registered: ‎11-29-2011
My Device: developer
My Carrier: other

Re: Why it's so big?

Are you building a debug load?  If you are including all debug symbols, I expect it will be much larger than a stripped variant.

Please use plain text.
Developer
mzex
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: Why it's so big?

[ Edited ]

Inside your project make new folder called "lib"

Inside that folder put libraries you use , in my Qt Quick projects there are: libQtCore.so.4,libQtDeclarative.so.4,libQtGui.so.4, libQtNetwork.so.4,libQtOpenGL.so.4,libQtScript.so.4,

libQtSql.so.4,libQtSvg.so.4,libQtXml.so.4,libQtXmlPatterns.so.4

In your bar-descriptor.xml file replace this line: 

<assetpath="%QT_INSTALL_LIBS%">lib</asset>

with

<assetpath="lib">lib</asset>

 Now, your .bar file should be around 13MB which is Ok. Of course, put only libraries which you use inside "lib" folder.

Please use plain text.
New Developer
shmily-lu
Posts: 14
Registered: ‎07-17-2012
My Device: 8900 and playbook
My Carrier: CHINA MOBILE

Re: Why it's so big?

I think your answer is great.

but I still have some problem.

 

1. I can't find where to make a new floder, I clicked the rightmouse, it had no.

2.So I make a floder called mylib in C:\ and replace the line with 

<assetpath="lib">lib</asset>

    and it can build.but when I deploy it, it said that:

java.lang.NullPointerException

at com.qnx.bbt.bar.BARPackager.addSourceRecursivelyWithBasePath(BARPackager.java:125)

at com.qnx.bbt.bar.BARPackager.addSourceRecursivelyWithBasePath(BARPackager.java:128)

at com.qnx.bbt.bar.BARPackager.addSourceRecursivelyWithBasePath(BARPackager.java:128)

at com.qnx.bbt.bar.BARPackager.addProviderSourceFiles(BARPackager.java:317)

at com.qnx.bbt.nativepackager.BarNativePackager.addProviderSourceFiles(BarNativePackager.java:65)

at com.qnx.bbt.packager.AbstractPackager.parseDescriptorAndCreateBarManifest(AbstractPackager.java:563)

at com.qnx.bbt.packager.AbstractPackager.doRun(AbstractPackager.java:232)

at com.qnx.bbt.packager.AbstractPackager.runPackager(AbstractPackager.java:158)

at com.qnx.bbt.nativepackager.BarNativePackager.main(BarNativePackager.java:59)

Error: null

11:37:49: 进程"D:\bbndk-2.1.0-beta1\host\win32\x86\usr\bin\blackberry-nativepackager.bat"退出(quit),退出代码 1(quit code 1) 。

Error while building/deploying project test1 (target: QNX Arm)

When executing step 'Create Bar package'

 

Could you tell my why please? thanks.

Please use plain text.
Developer
mzex
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: Why it's so big?

[ Edited ]

Make folder "lib" inside your project folder manually, with windows explorer.

You get that error, because your syntax is wrong, line startswith <assetpath.... and ends with <\asset> , thats no valid xml. Over there my syntax is wrong also, space get eaten when i copied. It should be 

<asset path="lib">lib</asset>

 

This will work.

Please use plain text.
New Developer
shmily-lu
Posts: 14
Registered: ‎07-17-2012
My Device: 8900 and playbook
My Carrier: CHINA MOBILE

Re: Why it's so big?

oh,you're so great!!! thanks very much and sorry for my careless.
Please use plain text.