# Error android native load opencv build from source

**URL:** <https://forum.opencv.org/t/error-android-native-load-opencv-build-from-source/7748>\
**Category:** Uncategorized\
**Tags:** android, build\
**Created:** [February 28, 2022, 3:02am UTC](https://forum.opencv.org/t/error-android-native-load-opencv-build-from-source/7748 "2022-02-28T03:02:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duong\_Pham](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/duong_pham/32/4638_2.png) [@Duong\_Pham](https://forum.opencv.org/u/Duong_Pham)\
**Post date:** [February 28, 2022, 3:02am UTC](https://forum.opencv.org/t/error-android-native-load-opencv-build-from-source/7748/1 "2022-02-28T03:02:00Z")

</div>

I build opencv android follow by guider [Guide build opencv android](https://mdeore.medium.com/latest-android-ndk-to-build-opencv-ccecd11efa82)

In guide said just build with arm64-v8a or armeabi-v7acan use for other ABI  
I builded with: _ **ANDROID\_ABI=armeabi-v7a** _  
Then it got error when android native load opencv with cmake:

```auto
Error while executing process Debug/4u6x2x51/arm64-v8a testopencv
opencv/build/lib/armeabi-v7a/libopencv_highgui.so: error adding symbols: File 
in wrong format

```

File Cmake in android native:

```auto
set(OpenCV_STATIC on)
set(OpenCV_DIR "path/opencv/build")
find_package(OpenCV REQUIRED)

```

when i build with option _ **ANDROID\_ABI=arm64-v8a** _  
Then it got error when android native load opencv with cmake:

```auto
Error while executing process Debug/4u6x2x51/armeabi-v7a testopencv
opencv/build/lib/arm64-v8a/libopencv_highgui.so: error adding symbols: File 
in wrong format

```

Did i do something wrong or have other to build opencv android support all ABI?  
thank you very much

---

<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:** [May 29, 2023, 3:05pm UTC](https://forum.opencv.org/t/error-android-native-load-opencv-build-from-source/7748/2 "2023-05-29T15:05:30Z")

</div>

A post was split to a new topic: [Issues with crosscompiling opencvsharp](https://forum.opencv.org/t/issues-with-crosscompiling-opencvsharp/13352)
