Closed LittleHans8 closed 5 years ago
@LittleHans8 Are you using AWS Java SDK v2 on Andriod? I'm not sure if it would work though.
We have a designated mobile SDK. https://docs.aws.amazon.com/sdk-for-android/index.html
@zoewangg Yes,I am using AWS Java SDK v2 on Andriod , sdk-for-android is work for me, but it can't custom endpoint.
Unfortunately, we won't be able to fix Apache http client for Android use case. Can you try with http url connection client?
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>url-connection-client</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
S3Client.builder()
.httpClientBuilder(UrlConnectionHttpClient.builder())
.build()
It works! Thanks, but need add javax.xml.stream:stax-api
and com.bea.xml.stream:org.motechproject.com.bea.xml.stream
lib to 'build.gradle' file.
It works! Thanks, but need add
javax.xml.stream:stax-api
andcom.bea.xml.stream:org.motechproject.com.bea.xml.stream
lib to 'build.gradle' file.
`javax.xml.stream:stax-api and com.bea.xml.stream:org.motechproject.com.bea.xml.stream version
Expected Behavior
No
java.lang.NoSuchFieldError
should be thrown.Current Behavior
Possible Solution
see : using-apache-httpclient-with-android-sdk-23-nosuchmethod
Steps to Reproduce (for bugs)
I want to generate an S3Client and the operation is failed, this is my code:
Your Environment