Getting error java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH in "xxxxx.so" (built with --hash-style=gnu?)
I am building so file in my android project using cmake. The ".so" works fine android device with higher OS versions like v9 and v10. But on lower OS version like v5.1.1 it fails with error- java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH in "xxxxx.so" (built with --hash-style=gnu?)
This error is because, on lower versions of android devices hash-style=gnu is not supported. So I need to set --hash-style=both. How can I set --hash-style=both in CMakeLists.txt?