我有一个OSGi包,我想在这个包中使用slf4j包,所以我已经添加到manifest.mf
(位于META-INF
)这个:我收到一个错误,当我想将slf4j包含在OSGi包中时
Import-Package: org.slf4j;version="[1.7.7,2)"
但我发现了这个错误:
This inspections reports usage of classes from packages not accessible inside the OSGi context - i.e. not imported neither implicitly nor via manifest file. Asking for such a classes may cause "class not found" exceptions at runtime. The inspection is only effective for modules with OSGi facet set to use existing manifest file.
我使用intellijidea 13.1
听起来不像是一个错误,但只是警告IntelliJ无法做某些检查。你的程序是不是编译或运行?如果没有,那么你得到的实际编译错误或运行时错误是什么? – Jesper 2014-09-23 08:49:48