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: 148
Registered: ‎11-16-2009
My Device: Not Specified

OS 6 (Torch) and interesting JSON stuff

Hi,

I need to support all possible OS versions in my app. It seems to work till i wanted to test it in OS 6 (Build and run from JDE 6).

When i tried to build i`ve got this error message.

 

Research In Motion\BlackBerry JDE 6.0.0\lib\net_rim_api.jar(net_rim_json_org.cod): Error!: Duplicate definition for 'org.json.me.JSONArray'  <project pagages> org.json.me.JSONArray

 

Yes i use JSON (the jar file is imported to the project) and i guess the new OS came with inbuild JSON parser. (same as the JAR!!)

 

If i build with JDE 4.2.1 it seems to work on OS 6 simulator, but i`m not sure is a good way.

 

Contributor
Posts: 29
Registered: ‎08-30-2010
My Device: Not Specified

Re: OS 6 (Torch) and interesting JSON stuff

hey i have the same problem.....is there some solution to this??

Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: OS 6 (Torch) and interesting JSON stuff

Same deal with barcode scanning.

 

RIM didn't even bother changing the package names...

Developer
Posts: 148
Registered: ‎11-16-2009
My Device: Not Specified

Re: OS 6 (Torch) and interesting JSON stuff

[ Edited ]

I built it with 4.2.1 and  no have problems in the emulator, i`m curios what will happen when the app will be released and somebody will install to a torch.

Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: OS 6 (Torch) and interesting JSON stuff

It will work fine, this is a compilation step issue.

Contributor
Posts: 16
Registered: ‎03-01-2011
My Device: 9700
My Carrier: Airtel

Re: OS 6 (Torch) and interesting JSON stuff

HI All,

 

I am having the same problem with the zxing library. I have my own zxing code which is bundled with my application and it works fine on jde 5.0.

 

I tried it in 9700 it was working fine but i need to test it in torch.

 

will the same build which works on 9700 will work on torch or  i need to get a build specified for torch.

 

Any suggestions will be use ful.

Regards,
KatharNavaS.
Contributor
Posts: 23
Registered: ‎02-22-2011
My Device: Not Specified

Re: OS 6 (Torch) and interesting JSON stuff

In my project I basically just downloaded org.json.me source code and renamed the package name. That way I can use the renamed JSON library in every OS version I need to support.
Visitor
Posts: 1
Registered: ‎06-06-2012
My Device: curve 8250
My Carrier: curve

Re: OS 6 (Torch) and interesting JSON stuff

If you are using OS 6 and above no need to add Json jar to your project,  BB JDE 6 or later comes with JSON standard, remove the one you added, and it should compile just find.

New Contributor
Posts: 3
Registered: ‎08-29-2011
My Device: BB8900
My Carrier: Idea

Re: OS 6 (Torch) and interesting JSON stuff

I was facing the same issue with JSON library and solve this problem by either of the below ways:
1. Change the default package name of JSON library but please read license before doing that.
2. Use pre- processor for controlling the including the library in case of JDE6 or above.