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

Java Development

Reply
Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Library Project

I created a library project, and now i am trying to add it to other projects and it seems to be i don't do it right. When i launch my app i get an error "erro starting module not found"...

 

What is the better way to add a library to my project?

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Library Project

Are you sure you're adding the library to the simulator/device?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 207
Registered: ‎09-10-2010
My Device: Not Specified

Re: Library Project

In Eclipse plug-in,

Right click on Project and go to Build Path > Configure Builde Path

Now under Libraries tab, add your  Library project.

Next go to Order & Export tab, here check your library project that you've just added. This will load library cod module along with app cods when you launch your app in simulator.

 

Hope this helps.

Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: Library Project

[ Edited ]

Hey,

 

   I did what you said. But when i launch the app it keeps saying the same. "Error statting 'myapp': Module 'MyLibrary' not found".

 

  Do I have to physically add myLibrary to my project?

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Library Project

I can't speak for Eclipse, but for JDE, if you have a completely separate project, you need to make sure the associated cod is added to the Simulator or device manually.

Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: Library Project

The only solution i found it's to copy to deliverables MyLibrary cods and so on, and add manually to .alx. The problem is everytime I do packaging I have to repeat the same operation.

 

 

 

Developer
Posts: 207
Registered: ‎09-10-2010
My Device: Not Specified

Re: Library Project

Another thing you can try is that Go to Run Configurations and make sure both app project and lib project are selected. Usually if you select app project, IDE will select any ref lib projects as well. If app proj is already selected and lib project is unselected then unselect the app proj and select it again. This has always worked for me. 

Developer
Posts: 588
Registered: ‎05-29-2009
My Device: 9100

Re: Library Project

But this is for simulating, isn't it?

Highlighted
Developer
Posts: 207
Registered: ‎09-10-2010
My Device: Not Specified

Re: Library Project

ohh..yes that's for simulator..somehow I believed that u r working on simulator. To add lib on project in device, you have to change either .alx or .jad file to specify lib cod. But I do have my own shortcuts to load app quickly to device. I load app through Debug in Device mode. Once it has finished loading, I stop debugging. Well debuggin mode may be little slow depending on system config but atleast doesn't make u change alx or jad file everytime. Smiley Wink