【发布时间】:2013-02-19 12:18:55
【问题描述】:
有没有人尝试在 Android 4.1 或 4.2 上运行 Apache Felix? 对我来说,看起来好像 android 类加载器上的某些东西已经改变了,现在它不再起作用了。
我以编程方式启动 apache felix,如下所示:
config.put("felix.bootdelegation.implicit", "false"); config.put("felix.service.urlhandlers","false"); ... felix.start();
我的包也被“索引”了!
我收到此错误:
03-04 23:38:51.360: W/System.err(1431): org.osgi.framework.BundleException: Activator start error in bundle org.apache.felix.shell.remote [25].
...
03-04 23:38:51.360: W/System.err(1431): at dalvik.system.NativeStart.main(Native Method)
03-04 23:38:51.360: W/System.err(1431): Caused by: java.lang.UnsupportedOperationException: can't load this type of class file
03-04 23:38:51.360: W/System.err(1431): at java.lang.VMClassLoader.defineClass(Native Method)
03-04 23:38:51.360: W/System.err(1431): at java.lang.ClassLoader.defineClass(ClassLoader.java:292)
03-04 23:38:51.360: W/System.err(1431): at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2128)
03-04 23:38:51.360: W/System.err(1431): at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)
03-04 23:38:51.360: W/System.err(1431): at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
03-04 23:38:51.360: W/System.err(1431): at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
03-04 23:38:51.360: W/System.err(1431): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
03-04 23:38:51.360: W/System.err(1431): at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1317)
03-04 23:38:51.360: W/System.err(1431): at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:4170)
03-04 23:38:51.360: W/System.err(1431): at org.apache.felix.framework.Felix.activateBundle(Felix.java:1972)
03-04 23:38:51.360: W/System.err(1431): ... 15 more
有人可以证实吗? 他们是解决方案吗? 也许它们是 apache felix 中必须更改的属性?!?!
【问题讨论】:
-
org.apache.felix.shell.remote捆绑包是否也被分解了? -
是的,所有捆绑包都被分解了!尼尔,你看到错误报告了吗?你怎么看?
-
是的,我看到了,但我没有看到它与这个问题有什么关系。
标签: android osgi classloader android-4.2-jelly-bean apache-felix