I try to create an OSGI bundle by using native C / C ++ code for deployment on Android devices running Felix I am
I was able to compile the original code and link the shared object using the Android NDK arm-linux-android devicechain.
Now, I try to export the OSGI bundle in a .jar file, it fails using Eclipse PDE (Export-> Deployment Plug-ins and Fragments) error-window Takes up to me saying:
'Export plug-in' has encountered a problem featuring the processing with org.eclipse.pde.container.feature: bundle my.bundle. Failed to resolve jni_test_1.0.0.qualifier: Unsatisfied native code filter: original / libjni_example.so; Processor = hand; OSNAME = linux When some other (such as the x86) processor sets, the export works, but when I start on my Android device, I get an "unresolved obstacle" error in the bundle.
I hope, I am not doing anything completely silly, do anyone have an idea, what is going wrong here? How do I add compiled country code for the OSGI bundle for Android?
For completeness, I get Java, C, Manifest, and Build. Attribute property content:
Java - & gt; JNI_Test:
package my.bundle.jni_test; Public Class JNI_Test {Private Zero doWork () {System.out.println ("3 + 3 =" + (3,3 Add)); } Fixed {System.loadLibrary ("jni_example"); } Public final static native int plus (int x, int y); } C -> Jni_example: #include "include / my_bundle_jni_0005ftest_JNI_0005fTest.h" # include & lt; Stdio.h & gt; JNIXport Zenit JNIKolJava_my_Bundle_Janie_1Test_JNITest_Ad (JNINW * NV, JClless Claude, Janty X, Janty Y) {four buff [100]; Sprintf (Buff, "% d to% d \ n", X, Y); Fprintf (stdout, "[INFO] -% s", buff); Fflush (stdout); Return x + y; } manifest:
manifest-version: 1.0 bundle-manifestwarson: 2 bundle-name: JNI test bundle-symbolic name: my.bundle.jni_test bundle -Visition: 1.0.0 Qualifier Bundle-Required Execution Environment: Java-1.6 Bundle-Basic Code: Original / libjni_example.so; Osname = linux; Processor = Hand Export-Package: my.bundle.jni_test build.properties:
source .. = src / output .. = bin / bin .includes = Meta-INF /, \., \ Natives / libjni_example.so
It looks like 'window - & gt; Preferences - & gt; Plug-in development - Target platform 'prevented export from succeeding
I have added a new entry to copy the setting from my existing target platform (option 'current target' has been selected), I under 'environment' the 'architecture' value in 'arm' Changed. There was no option provided by the drop-down list as 'arm', I manually wrote it in the text field.
That's it when using this target configuration, now everything works well The bundle is successfully exported and I can use it on my Android device.
No comments:
Post a Comment