如何在没有Cognito或Identit Pool的Android中使用Amazon S3 Transfer Utility?我想只使用用户ID和密钥来访问S3存储桶。我尝试以下代码,但它不起作用。
BasicAWSCredentials awsCreds = new BasicAWSCredentials(AWS_ACCOUNT_ID, AWS_PASSWORD);
AmazonS3 s3 = new AmazonS3Client(awsCreds);
TransferUtility transferUtility = new TransferUtility(s3, context);
transferUtility.upload(
BUCKET,
key,
file
);
什么是错的?