Quantcast
Channel: Questions in topic: "dllnotfoundexception"
Viewing all articles
Browse latest Browse all 201

Android 64-bit .so DLL file not found error

$
0
0
Hello, I am trying to update an older plugin to work for Android 64 bit builds, and am running into problems. Namely, I am trying to update the "OpenCV + Unity" plugin, and I have already created a 64bit "libOpenCvSharpExtern.so" file by editing the repo [here](https://github.com/Gobra/OpenCV-Unity). The file I have created is available [here](https://drive.google.com/file/d/1krnXgpeG7zXexUzgp6jzJpkx0IsGW22x/view?usp=sharing). I have checked using MSYS2 "file" commands that the file is a 64bit build file, which all seems to be correct, as far as I can tell. I have then added the file to "/Assets/../Plugins/Android/arm64-v8a/libOpenCvSharpExtern.so". By my understanding, this should work. Instead, the .so file is not added to my APK and the DLL cannot be found, resulting in the error: AndroidPlayer(ADB@127.0.0.1:34999) DllNotFoundException: Unable to load DLL 'OpenCvSharpExtern': The specified module could not be found. at OpenCvSharp.NativeMethods.core_Mat_sizeof () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.NativeMethods.TryPInvoke () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.NativeMethods..cctor () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.OCRHMMDecoder+ClassifierCallback..ctor (System.String fileName, OpenCvSharp.CvText+OCRClassifierType type) [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.Demo.AlphabetOCR..ctor (System.Byte[] model) [0x00000] in <00000000000000000000000000000000>:0 at molAR.Start () [0x00000] in <00000000000000000000000000000000>:0 Rethrow as OpenCvSharpException: Unable to load DLL 'OpenCvSharpExtern': The specified module could not be found. *** An exception has occurred because of P/Invoke. *** Please check the following: (1) OpenCV's DLL files exist in the same directory as the executable file. (2) Visual C++ Redistributable Package has been installed. (3) The target platform(x86/x64) of OpenCV's DLL files and OpenCvSharp is the same as your project's. System.DllNotFoundException: Unable to load DLL 'OpenCvSharpExtern': The specified module could not be found. at OpenCvSharp.NativeMethods.core_Mat_sizeof () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.NativeMethods.TryPInvoke () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.NativeMethods..cctor () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.OCRHMMDecoder+ClassifierCallback..ctor (System.String fileName, OpenCvSharp.CvText+OCRClassifierType type) [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.Demo.AlphabetOCR..ctor (System.Byte[] model) [0x00000] in <00000000000000000000000000000000>:0 at myCode.Start () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.NativeMethods.TryPInvoke () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.NativeMethods..cctor () [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.OCRHMMDecoder+ClassifierCallback..ctor (System.String fileName, OpenCvSharp.CvText+OCRClassifierType type) [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.Demo.AlphabetOCR..ctor (System.Byte[] model) [0x00000] in <00000000000000000000000000000000>:0 at myCode.Start () [0x00000] in <00000000000000000000000000000000>:0 Rethrow as TypeInitializationException: The type initializer for 'OpenCvSharp.NativeMethods' threw an exception. at OpenCvSharp.OCRHMMDecoder+ClassifierCallback..ctor (System.String fileName, OpenCvSharp.CvText+OCRClassifierType type) [0x00000] in <00000000000000000000000000000000>:0 at OpenCvSharp.Demo.AlphabetOCR..ctor (System.Byte[] model) [0x00000] in <00000000000000000000000000000000>:0 at myCode.Start () [0x00000] in <00000000000000000000000000000000>:0 (Filename: currently not available on il2cpp Line: -1) ---------- I have also tried to create a linker file based on another answer on this site, the file is called "link.dll" and has the below contents, which are quite possibly wrong: ---------- What am I doing wrong here? I am quite new to all this and likely doing something silly. Thank you in advance for your help!

Viewing all articles
Browse latest Browse all 201

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>