# Integrating openCV in an Android project

**URL:** https://forum.opencv.org/t/integrating-opencv-in-an-android-project/16689
**Category:** Android/Java
**Tags:** android, build
**Created:** [March 4, 2024, 9:22pm UTC](https://forum.opencv.org/t/integrating-opencv-in-an-android-project/16689 "2024-03-04T21:22:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ivelin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/ivelin/32/11207_2.png) [@ivelin](https://forum.opencv.org/u/ivelin)
#### Post date: [March 4, 2024, 9:22pm UTC](https://forum.opencv.org/t/integrating-opencv-in-an-android-project/16689/1 "2024-03-04T21:22:59Z")

</div>

I have just built OpenCV from source and adjusted my CMake configuration as so:

```auto
set(OpenCV_DIR "/home/ivelin/opencv/release")
find_package( OpenCV REQUIRED )
include_directories( ${OpenCV_INCLUDE_DIRS} )

target_link_libraries(${OpenCV_LIBS})

```

but I am getting this error:

```auto
Generating Android Package
  Input file: /home/ivelin/Desktop/SecureMe/smart-client/android-secureme-deployment-settings.json
  Output directory: /home/ivelin/Desktop/SecureMe/smart-client/android-build/
  Application binary: secureme
  Android build platform: android-34
  Install to device: No
The bundled library lib/libopencv_core.so.409 doesn't end with .so. Android only supports versionless libraries ending with the .so suffix.
make[2]: *** [CMakeFiles/secureme_make_apk.dir/build.make:71: CMakeFiles/secureme_make_apk] Error 12
make[1]: *** [CMakeFiles/Makefile2:121: CMakeFiles/secureme_make_apk.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

```

It is interesting why is that because I have a file libpopencv\_core.so and it has a symbolic link to libopencv\_core.so.409 and not the other way around, so I am confused why I get such error.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/2/269ebed9dcd06230ed5c7b6aae409ba11fec4091.png)

What causes this error? How can I fix it?

---

<div class="post-metadata">

### Author: ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)
#### Post date: [March 5, 2024, 11:26am UTC](https://forum.opencv.org/t/integrating-opencv-in-an-android-project/16689/2 "2024-03-05T11:26:15Z")

</div>

[crosspost](https://meta.stackoverflow.com/a/266159):

> <https://stackoverflow.com/questions/78104029/integrating-opencv-in-an-android-project-android-only-supports-versionless-libr>

---

<div class="post-metadata">

### Author: ![ivelin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/ivelin/32/11207_2.png) [@ivelin](https://forum.opencv.org/u/ivelin)
#### Post date: [March 5, 2024, 6:28pm UTC](https://forum.opencv.org/t/integrating-opencv-in-an-android-project/16689/3 "2024-03-05T18:28:01Z")

</div>

Yes, sorry ? I didn’t know that was a problem. I thought they are just separated platforms and I could ask separately on any

---

<div class="post-metadata">

### Author: ![ivelin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/ivelin/32/11207_2.png) [@ivelin](https://forum.opencv.org/u/ivelin)
#### Post date: [March 12, 2024, 5:05pm UTC](https://forum.opencv.org/t/integrating-opencv-in-an-android-project/16689/4 "2024-03-12T17:05:42Z")

</div>

I still have no luck in solving this problem. I’d be grateful if someone could take a look!
