开发者

Build failures Jena on Android (Androjena)

开发者 https://www.devze.com 2023-01-19 05:17 出处:网络
I am currently working on a mobile application which uses OWL ontologies. I am planning on using the androjena lib which is a port of the java jena lib.

I am currently working on a mobile application which uses OWL ontologies.

I am planning on using the androjena lib which is a port of the java jena lib.

http://code.google.com/p/androjena/

As instructed in the documentation, I have added the 5 .jar files included with Androjena to the build path of the Android Project.

This results in the following error开发者_Python百科s when compiling:

[2010-10-05 11:19:28 - MS Project] warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)

[2010-10-05 11:19:46 - Dex Loader] Unable to execute dex: null

[2010-10-05 11:19:46 - MS Project] Conversion to Dalvik format failed: Unable to execute dex: null

Anyone experienced similar problems?

Thanks!


Few months ago me and my research team were involved in a project using ontologies on Android-based mobile devices. We firstly tried the Androjena project (http://code.google.com/p/androjena/) but it's development is almost ceased and it supports only a subset of the Jena features. Therefore we tried to use the full Apache Jena project on Android. While the project is not directly working, we analyzed the issues and we came out with a fully working copy of Jena on Android.

see http://elite.polito.it/jena-on-android

The Jena framework defines some packages (mostly inherited from dependencies, Xerces, in particular) by using the namespace javax.* . Such a namespace is currently interpreted by the Dalvik cross-compiler as belonging to the "core" java library, thus not being "safe" to cross-compile. The result is that the code containing such packages is not cross-compiled unless the compiler is set in "core-library" mode which results in a compiled code that will probably cease working after system updates and that, as the cross-compiler warns, " will ultimately lead to pain, suffering, grief, and lamentation."

Actually the packages are not part of the java core library therefore a simple re-factoring solves the problem. In the specific case, we downloaded the last sources of xerces, refactored all javax.* packages to javax2.* and re-packed the library, and everything worked perfectly. This, by the way, enables the full Jena framework on Android, with the ability for developers to just include the needed modules as it is currently done in typical Java applications.


Even I encountered similar problem. I removed icu4j.jar from list of external JARs and it worked fine. Although I am not sure why this JAR is used in first place.

Anyways, have you tried to use any other reasoners for mobile apps and OWLs? I tried JESS but it seems to have some issues with porting.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号