labstreaminglayer / LSL4Unity

A integration approach of the LabStreamingLayer Framework for Unity3D
Other
83 stars 38 forks source link

DllNotFoundException: liblslAndroid #23

Closed alankarmisra closed 6 years ago

alankarmisra commented 6 years ago

I seem to be getting a DllNotFoundException while running the Demo_RotatingCube for Android on the Mac. Using Unity 2017.1.1f1 Personal + Visual Studio for Mac (Community), 7.3.3 (build 12). I get this error:

DllNotFoundException: liblslAndroid LSL.liblsl+StreamInfo..ctor (System.String name, System.String type, Int32 channel_count, Double nominal_srate, channel_format_t channel_format, System.String source_id) (at Assets/LSL4Unity/LSL.cs:152) Assets.LSL4Unity.Scripts.LSLMarkerStream.Awake () (at Assets/LSL4Unity/Scripts/LSLMarkerStream.cs:30)

I've managed to get LSL4Unity working for Mac Standalone, but Android is giving me trouble! At first I thought it was because of a file naming mismatch. LSL.cs mentions:

const string libname = "lslAndroid";

But the file name is actually liblslAndroid, so I tried changing the line to:

const string libname = "liblslAndroid";

But it still won't work. This is in the Editor Window btw. Is it not supposed to work in the Editor? I'll obviously test it on a real device as well, but I was wondering if it's possible to run/test within the Editor Window.

alankarmisra commented 6 years ago

Never mind. I was using an x86 Android emulator which is why the .so file could not be loaded. Tried on a real device and everything works flawlessly without any change to the code. Crisis averted. Apologies for the false flag!