문제 설명
Android에 OSGi Felix 포함 (Embed OSGi Felix in Android)
하지만 ExampleBattery 번들을 시작하려고 하면 다음 오류가 발생합니다.</p>
03‑29 05:29:44.942: E/Felix(8156) : "ExampleBattery.ExampleBattery" 번들을 시작할 수 없음: org.osgi.framework.BundleException: ExampleBattery.ExampleBattery [1](R 1.0)를 해결할 수 없음: 요구 사항 누락 [ExampleBattery.ExampleBattery [1](R 1.0)] osgi .이; (&(osgi.ee=JavaSE)(version=1.7)) 해결되지 않은 요구 사항: [[ExampleBattery.ExampleBattery [1](R 1.0)] osgi.ee; (&(osgi.ee=JavaSE)(version=1.7))]
Felix는 기본적으로 기본값을 사용하여 Java를 내보내기 때문에 이 상황은 매우 이상합니다. felix.jar에 있는 .properties 구성 파일:
.... org.osgi.framework.system.capabilities=${eecap‑${java.specification.version}}
eecap‑1.8= osgi.ee; osgi.ee="OSGi/최소"; 버전:목록="1.0,1.1,1.2", osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8" eecap‑1.7= osgi.ee; osgi.ee="OSGi/최소"; 버전:목록="1.0,1.1,1.2", osgi.ee; osgi.ee="JavaSE"; 버전: 목록 = "1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7"; ....
무슨 일이 일어났는지 잘 모르겠습니다. 답변을 주신 모든 분들께 감사드립니다.
기능=${eecap‑${java.specification.version}}</p>eecap‑1.8= osgi.ee; osgi.ee="OSGi/최소"; 버전:목록="1.0,1.1,1.2", osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8" eecap‑1.7= osgi.ee; osgi.ee="OSGi/최소"; 버전:목록="1.0,1.1,1.2", osgi.ee; osgi.ee="JavaSE"; 버전: 목록 = "1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7"; ....
</blockquote>무슨 일이 일어났는지 잘 모르겠습니다. 답변을 주신 모든 분들께 감사드립니다.
기능=${eecap‑${java.specification.version}}</p>eecap‑1.8= osgi.ee; osgi.ee="OSGi/최소"; 버전:목록="1.0,1.1,1.2", osgi.ee; osgi.ee="JavaSE"; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8" eecap‑1.7= osgi.ee; osgi.ee="OSGi/최소"; 버전:목록="1.0,1.1,1.2", osgi.ee; osgi.ee="JavaSE"; 버전: 목록 = "1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7"; ....
</blockquote>무슨 일이 일어났는지 잘 모르겠습니다. 답변을 주신 모든 분들께 감사드립니다.
자바SE'; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8"eecap‑1.7= osgi.ee; osgi.ee="OSGi/최소"; 버전:목록="1.0,1.1,1.2", osgi.ee; osgi.ee="JavaSE"; 버전: 목록 = "1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7";
....</p> </blockquote>
무슨 일이 일어났는지 잘 모르겠습니다. 답변을 주신 모든 분들께 감사드립니다.
자바SE'; version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8"eecap‑1.7= osgi.ee; osgi.ee="OSGi/최소"; 버전:목록="1.0,1.1,1.2", osgi.ee; osgi.ee="JavaSE"; 버전: 목록 = "1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7";
....</p> </blockquote>
무슨 일이 일어났는지 잘 모르겠습니다. 답변을 주신 모든 분들께 감사드립니다.
참조 솔루션
방법 1:
I could solve that problem by setting the following property to felix:
configMap.put(Constants.FRAMEWORK_SYSTEMCAPABILITIES, "osgi.ee; osgi.ee=\"JavaSE\";version:List=\"1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8\"");
(by PeppeMir、Computerwurm)