Opencascade Android library issue

I am trying to build an  Android application on Opencascade with the help of below url.

http://www.opencascade.com/doc/occt-7.0.0/overview/html/samples_java_android_occt.html

 

Everything works fine except I am stuck in below errors :

 

07-12 17:13:09.711: E/occtJniViewer(16333): Error: native library "gnustl_shared" is unavailable:

07-12 17:13:09.711: E/occtJniViewer(16333):   dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.opencascade.jnisample-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libgnustl_shared.so"

Error: native library "freetype" is unavailable:

07-12 17:13:09.711: E/occtJniViewer(16333):   dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.opencascade.jnisample-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libfreetype.so"

Error: native library "freeimage" is unavailable:

07-12 17:13:09.711: E/occtJniViewer(16333):   dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.opencascade.jnisample-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libfreeimage.so"

Error: native library "TKernel" is unavailable:

07-12 17:13:09.711: E/occtJniViewer(16333):   dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.opencascade.jnisample-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libTKernel.so"

 

I am not able to add gnustl_shared library and other .so files. Please suggest steps as the above link does not provide much detail about these.

Any help will be of great assistance.

Yoel Krupnik's picture

Hi,

I saw your post + solution on http://stackoverflow.com/questions/38349139/opencascade-android-studio .

Any idea how I can run this project on an X86 emulator which should be much faster than arm7?

In case you have some Android Studio project examples for Android apps using open cascade I would love to get a reference for them - I'm trying to write a simple app that at the first stage will let the user to choose 2 different CAD files and the app will merge (fuse) them and render the result, and unfortunately I find it very hard to begin.

Thanks,

Joel

Tauqir Ansari's picture

1. OCC libraries are not pre-compiled. I have tried to follow the steps  from https://dev.opencascade.org/doc/overview/html/occt_dev_guides__building_android.html. Inside Cross-compilation toolchain for CMake in above url, building process only supports arme-abi versions. There is no support for X86. I wanted to build it but so far no luck. So instead I went ahead with arme-abi-v7  (since majority of Android handset support armabi7). Please let me know if you find any solution.

  2.  As far as I know, you can easily add two different types of CAD files easily. I have tested it with adding more than 2 step files in a single screen. You have to be careful with the origin of the files.

You can also try using Matrix to place the objects in your specified location.

I will try to send some code snippets if possible.

Please let me know in case of any issue.