Forum Xamarin.Android

Error loading library (FFmpeg)

Jamie91Jamie91 NLMember
edited May 2016 in Xamarin.Android

Hey,

I am trying to load some .so files into my Xamarin project which should take care of my video feed.

Here is just an example of the error (this is just one), but I get erros of all the .so files.

DllImport error loading library '/storage/emulated/0/Android/data/com.james.project/files/.__override__/libavformat-54': 'dlopen failed: library "/data/app/com.james.project-1/lib/arm//storage/emulated/0/Android/data/com.james.project/files/.__override__/libavformat-54" not found'.

What I did is create a folder called "armeabi-v7a" in the folder "lib". The following files are in this folder:

libavcodec-54.so
libavformat-54.so
libavutil-52.so
libswscale-2.so

Also I tried to add the following code to the Project.csproj file:

  <ItemGroup>
    <AndroidNativeLibrary Include="lib\armeabi-v7a\libavcodec-54.so">
      <Link>lib\armeabi-v7a\libavcodec-54.so</Link>
    </AndroidNativeLibrary>
    <AndroidNativeLibrary Include="lib\armeabi-v7a\libavformat-54.so">
      <Link>lib\armeabi-v7a\libavformat-54.so</Link>
    </AndroidNativeLibrary>
    <AndroidNativeLibrary Include="lib\armeabi-v7a\libavutil-52.so">
      <Link>lib\armeabi-v7a\libavutil-52.so</Link>
    </AndroidNativeLibrary>
    <AndroidNativeLibrary Include="lib\armeabi-v7a\libswscale-2.so">
      <Link>lib\armeabi-v7a\libswscale-2.so</Link>
    </AndroidNativeLibrary>
  </ItemGroup>

When I navigate to the folder "/storage/emulated/0/Android/data/com.james.project/files/.__override__/" on the smartphone, then I don't see the .so files, so I understand the errors...

What do I need to do?

Thanks in advance,

Jamie

Sign In or Register to comment.