Knoflerfish in Android - Bundle start failed -


i follow tutorial embed osgi android application. however, after installing , starting bundle, state became resolved (4), not active (32) must be. when try start once again, throws exception:

bundle#1 start failed java.lang.classnotfoundexception: org.knopflerfish.tutorial.simplebundle.impl.activator org.knopflerfish.framework.bundleimpl.start0(bundleimpl.java:421) org.knopflerfish.framework.bundlethread.run(bundlethread.java:145) 

this bundle sample bundle knopflerfish examples source. works when installed in knopflerfish destop (framework.jar)

i thought of dex, no use merge jar file , dex file, still doen't work.

what problem here? thank much!

after several day have found solution problem. post here may concern.

first of all, problem related dex file. dex file can not found make bundleclassloader can not find activator class. in jar file after executing dx , aapt commands, *.dex must situated in top path. can check extracting jar file , see.

bundler.jar ----meta-inf ----org ----classes.dex 

another point need consider if app still doesn't work. in android newer version, dex file can not located in external storage (as explained here http://developer.android.com/reference/dalvik/system/dexclassloader.html), need modify code set org.osgi.framework.storage property.

instead of:

map<string, string> fwprops = new hashtable<string, string>(); fwprops.put("org.osgi.framework.storage", environment.getexternalstoragedirectory().getabsolutepath() + "/fwdir"); 

i use this:

map<string, string> fwprops = new hashtable<string, string>(); file dexoutputdir = getdir("dex", 0); fwprops.put("org.osgi.framework.storage", dexoutputdir.getabsolutepath()); 

hope help.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -