I have a use-case in my android application where I need to save a quantity, perform calculations on it, and display it in a unit of the user's choice (from a predefined list).
JScience fit this need perfectly, but I cannot compile the application for Android due to the following error:
Error: Program type already present: javolution.ContextTestSuite$1
I note that JSCience is powered by javolution. This leaves me with two options: find a different library (I've found the JSR-363 API but I have been unable to find documentation on it beyond a few use cases as discussed in the links in this SO response; for example, those links do not discuss the concrete unit types and where they can be found) or fix the incompatibility I have experienced between JScience and Android.
I will accept a solution that does either of those.
Not sure what else uses it, but this is caused by a double dependency of javolution. What you can do is in the build.gradle (Module app) file, you can exclude javolution when you include jscience.
Clean/Rebuild Project and it should work.