【问题标题】:How to store files in zip / rar archive with Xamarin Android?如何使用 Xamarin Android 将文件存储在 zip/rar 存档中?
【发布时间】:2017-12-15 11:04:50
【问题描述】:

我正在开发一个应用程序,我需要将图片存储在档案中并作为电子邮件附件发送。

如何创建一个 zip 文件/rar 文件并将图片保存在其中?

我整天都在搜索,但没有什么对我有用。例如尝试过这个: http://stacktips.com/tutorials/android/how-to-programmatically-zip-and-unzip-file-in-android

谢谢!

【问题讨论】:

  • "nothing works" 并没有告诉我们任何有用的信息。相反,请说明您在尝试解决方案时遇到了哪些具体错误。

标签: android xamarin zip archive rar


【解决方案1】:

我使用 SharpLibZip.Portable 库 (http://icsharpcode.github.io/SharpZipLib/) 。您可以在 Nuget 包管理器中获取它。

它在 Android 和 UWP 中运行良好(在 iOS 中没有为我证明)。

【讨论】:

    猜你喜欢
    • 2013-05-09
    • 1970-01-01
    • 2018-10-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-10
    • 2014-06-25
    • 1970-01-01
    相关资源
    最近更新 更多