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
Developer
arv
Posts: 122
Registered: ‎08-11-2008
My Device: 9700

Failed to load platform plugin "". Qt in Momentics IDE.

 

Hi,

 

I built Qt on MacOS.

Succesfully test Hello World from this URL: http://hecgeek.blogspot.com/2011/10/qt-for-blackberry-playbook.html

using command line.

 

Now I start developing using Momentics IDE NDK Beta 2.

Success compiling & linking.

 

Update bar-descriptor.xml like this:

-----

<configuration id="com.qnx.qcc.configuration.exe.debug.1367870161" name="Device-Debug">
  <platformArchitecture>armle-v7</platformArchitecture>
    <asset path="Device-Debug/helloq" entry="true" type="Qnx/Elf">helloq</asset>
    <asset path='/Users/o/QNX/Qt/stage/nto/armle-v7/usr/lib/qt4/lib/libQtCore.so.4' type='Qnx/Elf'>lib/libQtCore.so.4</asset>
    <asset path='/Users/o/QNX/Qt/stage/nto/armle-v7/usr/lib/qt4/lib/libQtGui.so.4' type='Qnx/Elf'>lib/libQtGui.so.4</asset>
    <asset path='/Users/o/QNX/Qt/plugins/platforms/libblackberry.so' type='Qnx/Elf'>lib/platforms/libblackberry.so</asset>
</configuration>

-----

 

when I "run to Device" or "debug to Device",

the Application deployed on device, splash at the screen, then exit.

I found this on the Console:

Failed to load platform plugin "". Available platforms are: 

 

(just 1 line, no available plaform define).

 

anyone know what's platform plugin?

 

already follow anything from this thread http://supportforums.blackberry.com/t5/Native-SDK-for-BlackBerry-Tablet/Installing-QT-in-the-QNX-IDE...

but still no luck.

 

 

thank you for any help.

 

 

--
"Give kudos (star) if you feel response is helpful"
Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Failed to load platform plugin "". Qt in Momentics IDE.

That libblackberry library suppose to be in lib or lib/platform? Try to put it in lib.

Please use plain text.
Developer
nunocastro
Posts: 15
Registered: ‎11-17-2011
My Device: Playbook

Re: Failed to load platform plugin "". Qt in Momentics IDE.

I had the same issue a while back.

 

To solve this, first you need to include the platform plugin in the project, by adding it to the bar-descriptor.xml file as an asset.

On your QT lib directory there should be a plugins dir and inside that a platforms dir. Inside this directory you should have file called libblackberry.so.

This is the file you need to add to your assets section of the bar-descriptor.xml file. Don't forget to set the target path to 'lib/platforms/libblackberry.so'.

With this, the platform plugin should be copyed to the Simulator/ Device.

 

After this, you need to add a argument to your run configuration indicating the platform that you are running on, which is done by adding the " -platform blackberry " on the arguments tab, on your Run Configuration.

 

Hope this helped.

 

Regards.

 

Nuno Castro

Please use plain text.
Developer
Developer
arv
Posts: 122
Registered: ‎08-11-2008
My Device: 9700

Re: Failed to load platform plugin "". Qt in Momentics IDE.

 

Hi nunocastro,

thank you for your information.

 

with the argument " -platform blackberry ",

i think its more closer to the main problem, but still error.

here's the output from console:

Failed to load platform plugin "blackberry". Available platforms are: 

 

my libblackberry.so originally at 

Qt/stage/nto/armle-v7/usr/lib/qt4/plugins/platforms/libblackberry.so

 

then I creating soft-link, so the libblackberry available at

Qt/stage/nto/armle-v7/usr/lib/qt4/lib/platforms/libblackberry.so

 

here's my assets list:

<asset path='/Users/o/QNX/Qt/stage/nto/armle-v7/usr/lib/qt4/lib/libQtCore.so.4' type='Qnx/Elf'>lib/libQtCore.so.4</asset>
<asset path='/Users/o/QNX/Qt/stage/nto/armle-v7/usr/lib/qt4/lib/libQtGui.so.4' type='Qnx/Elf'>lib/libQtGui.so.4</asset>
<asset path='/Users/o/QNX/Qt/stage/nto/armle-v7/usr/lib/qt4/lib/platforms/libblackberry.so' type='Qnx/Elf'>lib/platforms/libblackberry.so</asset>

 

 

still no luck with the bar-descriptor.xml.

any clue how to check if the libblackberry.so is packaged well in the app?

 

any other clue?

 

thank you..

 

 

 

--
"Give kudos (star) if you feel response is helpful"
Please use plain text.
Developer
nunocastro
Posts: 15
Registered: ‎11-17-2011
My Device: Playbook

Re: Failed to load platform plugin "". Qt in Momentics IDE.

 

To check if the lib is correctly in place you can open the BAR file that is being deployed to the device.

The BAR files is just a ZIP file renamed, so if you rename it to ZIP you should be able to open it.

 

Inside the BAR file you should have a native folder with your application.

You can check if in the native folder you have a lib folder with all the libs and the platform folder with the libblackberry.so file.

 

If you placed the " -platform blackberry " argument in your run config, then the only difference I can see from my set up is that I builded my code on Momentics with NDK 1 and run it on a device with PBOS 2.0 Beta.

I still haven't built QT with NDK 2.

 

Did you built the QT source against the NDK 2 ?

 

Regards,

 

Nuno Castro

Please use plain text.
BlackBerry Development Advisor
elena_laskavaia
Posts: 417
Registered: ‎10-27-2010
My Device: PlayBook

Re: Failed to load platform plugin "". Qt in Momentics IDE.

How does Qt find these platform library at runtime? Aren't you suppose to set some env var to point where it is?

You can set env vars in xml using <env var=... value=... /> tag

Please use plain text.
Developer
nunocastro
Posts: 15
Registered: ‎11-17-2011
My Device: Playbook

Re: Failed to load platform plugin "". Qt in Momentics IDE.

From what I can understand QT searches for the these plugins specificly in the lib/plugins folder that exists on the application.
When you set the argument you are telling QT which platform plugin to search for on that dir.
I don't know if there is another way of telling QT where to search for the plugins.

In which version of the NDK did you built your QT version?
If you built it with NDK 1, and are trying to run it on a NDK 2 project, maybe the plugin won't work, as it was build with a diferent version that your application.

Regards.

Nuno
Please use plain text.
Developer
Developer
arv
Posts: 122
Registered: ‎08-11-2008
My Device: 9700

Re: Failed to load platform plugin "". Qt in Momentics IDE.

 

Hi nunocastro,

 

I already checked the bar file,

the directory structure is as expected:

./META-INF
./META-INF/MANIFEST.MF
./native
./native/bar-descriptor.xml
./native/helloq
./native/icon.png
./native/lib
./native/lib/libQtCore.so.4
./native/lib/libQtGui.so.4
./native/lib/platforms
./native/lib/platforms/libblackberry.so

 

 

I just want to report to you that I built the Qt with NDK 2 beta 1 and NDK 2 beta 2.

 

still with this problem:

Failed to load platform plugin "blackberry". Available platforms are: 

 

 

thank you for your help.

 

 

--
"Give kudos (star) if you feel response is helpful"
Please use plain text.
Developer
Developer
arv
Posts: 122
Registered: ‎08-11-2008
My Device: 9700

Re: Failed to load platform plugin "". Qt in Momentics IDE.

 

Hi Elena,

 

actually I didn't understand anything about Qt.

I just want try to build Qt on my PlayBook, because I want to create a UI application non opengl,

no simple HelloWorld at github.com/BlackBerry/Qt

 

I don't know what to pass to the environment variable,

because I just try the example as many people refer as the how to build Qt for PlayBook at Linux.

( http://hecgeek.blogspot.com/2011/10/qt-for-blackberry-playbook.html but I did it at Macosx)

 

thank you.

 

--
"Give kudos (star) if you feel response is helpful"
Please use plain text.
Developer
Developer
arv
Posts: 122
Registered: ‎08-11-2008
My Device: 9700

Re: Failed to load platform plugin "". Qt in Momentics IDE.

 

Anyway,

I will try to build Qt on NDK 1 as nunocastro suggest.

Build Qt with NDK 1 and run it on PlayBook 2.0 beta.

 

I will report it again after build using NDK version 1.

 

thank you.

 

 

--
"Give kudos (star) if you feel response is helpful"
Please use plain text.