我目前正在关注 Amazon 的 AWSSDK 文档(特别是:this)以尝试访问 Xamarin 表单应用程序上的 AmazonS3 数据。我遇到了一个错误,所以我用新的包开始了一个新项目,据我所知都是最新的,但仍然遇到同样的问题。
这是类背后的主要代码的当前代码:
public partial class MainPage : ContentPage
{
private static IAmazonS3 client;
private static readonly RegionEndpoint bucketRegion = RegionEndpoint.USWest2;
public MainPage()
{
InitializeComponent();
// I have tried each of the following:
client = new AmazonS3Client(); <--- ERROR
client = new AmazonS3Client(RegionEndpoint.USWest2); <-- SIMILAR ERROR
client = new AmazonS3Client(bucketRegion); <-- SAME ERROR
// This has a different error, lack of RegionEndpoint, which is expected, but at least this seems to …Run Code Online (Sandbox Code Playgroud)