Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 47607 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Steps to reproduce:
1) Create an Android project that does not have x86_64 in the list of enabled architectures.
2) Link project to a package that has an Android library with an x86_64 build. SQLitePCLRaw is one example.
3) Build the app and try to run it on a x86_64 device or simulator.
App crashes on startup with the following output
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/<package>-1/base.apk"],nativeLibraryDirectories=[/data/app/<package>-1/lib/x86_64, /data/app/<package>-1/base.apk!/lib/x86_64, /vendor/lib64, /system/lib64]]] couldn't find "libmonodroid.so"
at java.lang.reflect.Method.invoke(Native Method)
It looks like the app is built incorrectly in this case. I can see that the APK file has libs/x86_64 folder with a single file libe_sqlite3.so in it. This probably makes package manager believe that app has x86_64 build even though x86_64 architecture is un-checked in the project settings.
The APK file should not contain libs/x86_64 folder unless it is enabled in the project settings.
Enable x86_64 architecture in the project settings. This increases the APK size but fixes the problem.
Strangely, this is limited to x86_64 architecture, but not arm64-v8a
I have this problem with Xamarin.Android 7.1, did you ever resolve it? We need to manually pack the APK in order to fix it.
I'm seeing this issue too, but in the 15.2 Beta Preview 2. Please help. Because of another open issue, the workaround listed above (Enabling x86_64 architecture) cannot work.
Here's a link to the other issue that compounds my problem with this one:
We are having the same issue. Is there a fix planned for this?
Thank you for taking the time to submit the bug. We are unable to reproduce this issue. Please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue.
Please also attach your version information to confirm which version of Xamarin.Android is being used. Thanks!
Xamarin.Android version 18.104.22.168
I haven't had time yet to setup a demo project or test it on a more recent version of Xamarin.Android but I think I did find the source of the problem:
"x86/library.so" and "x86_64/library.so" both contain the string "x86". So when compiling for x86 but not for x86_64, still both libraries are being put in the apk
Resulting lib folder in the APK:
Can someone change the status of this bug? It looks like the problem has been identified and just needs a fix.
This issue is bloating our app due to needing to include x86_64 unnecessarily to work around it, otherwise the app crashes on x86_64 devices.
Anyone?... Please update the status of this issue from NEEDINFO to something else.
Please see this follow pull request. It contains a fix and test project. I was testing using a x86_64 device.
Sorry, forgot the link. https://github.com/xamarin/xamarin-android/pull/796
Pull request was merged into master and confirmed using nightly build that this fixes the problem.
I am having the same issue with VS for Mac 7.2 and Xamarin Android 8.0.33 when trying to build my MonoGame application.
When I select armeabi v7 + x86 as my release architectures (leaving x86_64 unselected) and then generate the APK the resulting file contains wrong dlls:
Has the fix in develop not got into 22.214.171.124 or is there another place where the bug needs to be fixed?
I can confirm this went out in the Visual Studio 2017 15.5 Preview 1. I actually just did a build today with this change using it.
You must be using Xamarin Android 8.1
If you don't want VS Preview, just pull Xamarin Android 8.1 from here