nunit.xamarin
nunit.xamarin copied to clipboard
Cannot run test with EmbeddedNativeLibrary
Hi, We are having problems running NUnit Unit Tests in a Xamarin.Android Project. We are trying to test an Android Class Library Project that is using four EmbeddedNativeLibraries internally. When trying to run our NUnit unit test it fails on loading the libraries with the error
DllImport attempting to load: 'libNAME.so'. 12-19 18:07:54.561 D/Mono (13724): DllImport error loading library '/storage/emulated/0/Android/data/NAME.Api.Wrapper.Test.Runner/files/.override/libNAME.so': 'dlopen failed: library "/data/app/NAME.Api.Wrapper.Test.Runner-1/lib/arm//storage/emulated/0/Android/data/NAME.Api.Wrapper.Test.Runner/files/.override/libNAME.so" not found'. 12-19 18:07:54.562 D/Mono (13724): DllImport error loading library '/storage/emulated/0/Android/data/NAME.Api.Wrapper.Test.Runner/files/.override/libNAME.so': 'dlopen failed: library "/data/app/NAME.Api.Wrapper.Test.Runner-1/lib/arm//storage/emulated/0/Android/data/NAME.Api.Wrapper.Test.Runner/files/.override/libNAME.so" not found'. 12-19 18:07:54.563 D/Mono (13724): DllImport error loading library '/system/lib/libNAME.so': 'dlopen failed: library "/data/app/NAME.Api.Wrapper.Test.Runner-1/lib/arm//system/lib/libNAME.so" not found'. 12-19 18:07:54.564 D/Mono (13724): DllImport error loading library '/system/lib/libNAME.so': 'dlopen failed: library "/data/app/NAME.Api.Wrapper.Test.Runner-1/lib/arm//system/lib/libNAME.so" not found'. 12-19 18:07:54.566 D/Mono (13724): DllImport error loading library 'libNAME.so': 'dlopen failed: library "libNAME_imaging.so" not found'. 12-19 18:07:54.567 D/Mono (13724): DllImport error loading library 'libNAME.so': 'dlopen failed: library "libNAME_imaging.so" not found'. 12-19 18:07:54.573 D/Mono (13724): DllImport error loading library 'libNAME.so': 'dlopen failed: library "libNAME_imaging.so" not found'. 12-19 18:07:54.573 W/Mono (13724): DllImport unable to load library 'dlopen failed: library "libNAME_imaging.so" not found'.
Things we have done so far:
- We have created a test runner project for Android using the NUnit templates given here: Templates.
- The test runner project is using NUnit and nunit.xamarin version 3.0.1.
- We are not using Xamarin.Forms anywhere, just Xamarin.Android.
- The Android Library Project we are trying to test is not doing any UI stuff.
- We tried putting a copy of the libraries into the test runner project.
- We tried having the test in the test runner project and in a separate test project.
- We looked into the dll, the apk and checked the file system of our test device via adb. The libraries were present in all places.
Are we doing something wrong or is this simply not supported ?
It looks like you have tried everything that I would have tried and then some. When I get a chance, I will try to reproduce with a simpler project and see if I can offer any suggestions or solutions.
Hi, Are there any updates on this ?
@rprouse Not meaning to bother you, are there any updates to this ?