[英]AWS/Android Credentials not authenticating
I am trying out Amazon's S3 Uploader app for Android and when I put my new credentials in the S3Client constructor the app crashes. 我正在试用适用于Android的Amazon S3 Uploader应用程序,当我将新凭据放入S3Client构造函数时,应用程序崩溃。
private AmazonS3Client s3Client = new AmazonS3Client(new BasicAWSCredentials(Constants.ACCESS_KEY_ID, Constants.SECRET_KEY));
Are there other requirements aside from making an access key ID and secret key? 除了制作访问密钥ID和秘密密钥之外,还有其他要求吗?
try this dude i try same code and my app is running fine and one more thing do this code in oncreate() of IntentService 试试这个家伙,我尝试相同的代码,我的应用程序运行良好,还有另外一件事在IntentService的oncreate()中执行此代码
String accessKey = "";
String secretKey = "";
String AccessToken="";
accessKey = Constants.getAWSAccessKey();
secretKey = Constants.getAWSSecretKey();
AccessToken = Constants.getAWSAccessToken();
s3Client = new AmazonS3Client(new BasicSessionCredentials(accessKey, secretKey, AccessToken));
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.