01-13-2011 03:04 PM
I have created a common library in Eclipse using SDK 4.7 and added that as an external jar to a different project.
When I select the 4.7 sdk, the project runs fine on the simulator, but when I select SDK 5.0, I get RunTimeErrror.
Running in debug mode, I get class not found error. Its custom class I wrote.
I assume that the library projects are forward compatible.
Am I missing something?
01-13-2011 05:11 PM
I would look for another issue before deciding there was a problem with a library compatibility. I've not seen any issues like that, and would think a Library that works in 4.7 should work in 5.0. Was the Library compiled using 4.7?
01-13-2011 05:18 PM
Thanks for the reply.
Yes, the library was compiled in 4.7.
If you could provide me a direction for the kind of issues I should look for, that will be great.
01-13-2011 07:23 PM
I suspect that the jar has not been compiled into a cod and/or the associated cod has not been loaded onto the OS 5.0 SImulator. This is why you get a class not found.
01-13-2011 10:00 PM
Thanks for the reply.
Is there any specific setting I need to change to load the cod file?
When I change the SDK of the library to 5.0, the applications run fine on the simulator.
01-13-2011 10:16 PM - edited 01-13-2011 10:20 PM
I may have been overdoing it, but in my experience you have to rebuild the library for 5.0 or other OS version you wish to support. Perhaps this is an IDE specific issue to the eclipse plugin.
It's a while since I first tried this, but I believe the eclipse IDE plugin looks for the 5.0 version of the library project when packaging the main project.
Could be wrong, but I've been using libraries for the last 18 months without issue by always building for each version in the IDE.
01-13-2011 10:45 PM
I've had no such issue. I have libraries ranging from 4.5 to 6.0 and can use the 4.5 library on 6.0, let alone 4.7 on 5.0.
@DD12: I assume the class is in the library? Do you get the exception when you try to run the app, load the app (onto the device), or while the app is running?
01-13-2011 10:50 PM
@rcmaniac25, are you using the eclipse plugin? I'm not saying you can't use the library - just that I had problems using libraries within eclipse. Could be my setup I guess.
01-13-2011 10:55 PM
Yes, had no problems with 3.4 (original plugin), 3.5 (now old plugin), and now 3.6.
01-13-2011 11:03 PM - edited 01-13-2011 11:10 PM
Must be some other reason then, but I had problems unless I rebuilt the libraries for each OS level. I await the resolution of this thread with interest! Hopefully I'll find the solution to my issue also.
Come to think of it, I was creating a project dependency rather than adding the library as an external JAR since I was editing the library code. Maybe that was the difference.