Use retrofit2 for binding development - Error: Missing requirement

I am developing a binding and trying to use retrofit2. I added the dependency in my pom.xml:

<!-- -->

Additionally, I added this line to my feature.xml:

<bundle dependency="true">wrap:mvn:com.squareup.retrofit2/retrofit/2.7.0</bundle>

When i compile my bundle i get the following error:

[…] caused by: Unable to resolve org.openhab.binding.connctd/ missing requirement [org.openhab.binding.connctd/] osgi.wiring.package; filter:="(osgi.wiring.package=android.os)

Do I need to add more dependencies or is retrofit2 not compatible with openHAB/OSGi (On the maven page it lists android as optional)? I found this GitHub Page which seems to address the problem but I do not understand the content.

Any help is appreciated.

1 Like