My Android Studio version is 3.1.2, Java version is 1.8
I use following step to add OpenCV to project
Create new project and checked \"Include C++ suppo
This problem is being tracked on OpenCV GitHub: OpenCV doesn't link on Android x86/x86_64 with ndk 16.0.4442984 with R_386_GOTOFF error (closed).
TL;NR: the prebuilt binaries of OpenCV-android-sdk, and in particular the x86/libippicv.a, is not compatible with the latest NDK r16. The easiest workaround is to use an older NDK version. If you cannot, the patch which excludes libippicv.a should do the job:
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a")