I'm trying to build LexRuntimeV2Client on android but when ever i start app and try to build LexRuntimeV2Client object i get error Verifier rejected class software.amazon.awssdk.http.apache.ApacheHttpClient.
i'm using following dependancies to integrate amazon lex into android app
implementation 'software.amazon.awssdk:auth:2.17.170'
implementation 'software.amazon.awssdk:lexruntimev2:2.15.69'
and below is code to initialize LexRuntimeV2Client
fun initBot() {
val awsCreds = AwsBasicCredentials.create(accessKey, secretKey)
val awsCredentialsProvider: AwsCredentialsProvider = StaticCredentialsProvider.create(awsCreds)
lexV2Client = LexRuntimeV2Client
.builder()
.credentialsProvider(awsCredentialsProvider)
.region(region)
.build()
}
below is complete error details
java.lang.VerifyError: Verifier rejected class software.amazon.awssdk.http.apache.ApacheHttpClient: void software.amazon.awssdk.http.apache.ApacheHttpClient.$r8$lambda$CesDBZD1BbE4st5txvnWxnpBCPc(org.apache.http.client.methods.HttpRequestBase) failed to verify: void software.amazon.awssdk.http.apache.ApacheHttpClient.$r8$lambda$CesDBZD1BbE4st5txvnWxnpBCPc(org.apache.http.client.methods.HttpRequestBase): [0x0] 'this' argument 'Reference: org.apache.http.client.methods.HttpRequestBase' not instance of 'Reference: org.apache.http.client.methods.AbstractExecutionAwareRequest' (declaration of 'software.amazon.awssdk.http.apache.ApacheHttpClient' appears in /data/app/~~i2KF2yrPYNJqlsN6l-qf2Q==/sg.mirobotic.amazonamplify-n_YUrdscKOpFbLOfe2at4w==/base.apk!classes7.dex)
I'm stuck into this part since long. If anyone has idea to fix this then please help me on this