Reputation: 410
I am trying to use the DotNetZip library in my Monodroid app. Everything seems to work fine when I enable the Shared Runtime build option. When I disable Shared Runtime, the line
static System.Text.Encoding ibm437 = System.Text.Encoding.GetEncoding("IBM437");
generates an Exception (Encoding name 'IBM437' not supported). I've checked every box in the "Additional Supported Encodings" list, but it does not seem to help. Anyone have any ideas?
Upvotes: 6
Views: 3055
Reputation: 1858
I had the exact same problem.
First, make sure that you've added the "West" encoding in the project properties:
If that doesn't do the trick, the problem is that the needed dlls are not getting copied to the .apk's assemblies folder. This should happen automatically, but it doesn't. I filed a bug, so you can see if it's been fixed:
Mono for Android / Xamarin Bugzilla
If not, here is a workaround that worked for me (from Xamarin):
Add the following dummy code to get the 2 dlls added to the .apk
var ignore = new I18N.West.CP437();
Make sure that 'Linking' is set to 'None'
Hope this helps!
Upvotes: 11