Problem dependencies

I have set up the new IDE.
Successfully build the jar.
But when i install the jar i receive

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.smhi [86]
  Unresolved requirement: Import-Package:; version="[2.8.0,3.0.0)"

How do i add dependency to gson?

This is because the current snapshot has a newer gson version than is in the release version of openHAB. A workaround is to create a lib directory in your binding directory and put a gson jar (version 2.8 or higher) in that lib directory and build the binding again. Do not commit or put this jar in git as it’s a workaround to make the binding work with the current release version of openHAB.

You could also install the dependency manually on the karaf console:


That link is not working.
I used bundle:install
I hope this may help someone else

1 Like