1

Getting error when trying to update version https://search.maven.org/artifact/com.amazonaws/aws-android-sdk-auth-userpools

val initializeBuilder = AWSMobileClient.getInstance().initialize(activity) {
        createAwsSessionComponent(environment, configuration)
        doAfter.run()
    }
    initializeBuilder.awsConfiguration(configuration)
    initializeBuilder.execute()

getting error

Type mismatch. Required: Callback<UserStateDetails!>! Found: () → Unit

I am currently getting this error while logging analytics was able to log all other events but a specific event when popup box is display i am getting this issue.

AbstractKinesisRecorder: DeadLetterListener onRecordsDropped has thrown an exception (user code)
java.lang.NullPointerException: Attempt to invoke interface method 'void com.amazonaws.mobileconnectors.kinesis.kinesisrecorder.DeadLetterListener.onRecordsDropped(java.lang.String, java.util.List)' on a null object reference



AbstractKinesisRecorder: ServiceException in submit all, the last request is presumed to be the cause and will be dropped
com.amazonaws.AmazonServiceException: User:
RockyGlobal
  • 525
  • 5
  • 13

1 Answers1

0

To create a Native Android Mobile app that can invoke AWS Services, try using the AWS SDK for Kotlin. You can find information on how to get up and running with this SDK here:

Setting up the AWS SDK for Kotlin

This SDK works nicely with Android Studio to build Android Apps. It exposes a strongly typed Service Client you can use within an Android Studio project. For example, to invoke SNS, you can use SnsClient:

fun getClient() : SnsClient{

        val staticCredentials = StaticCredentialsProvider {
            accessKeyId = "<Enter key>"
            secretAccessKey = "<Enter key>"
        }

        val snsClient = SnsClient{
            region = "us-west-2"
            credentialsProvider = staticCredentials
        }

        return snsClient
    }

Link in the comment below.

smac2020
  • 9,637
  • 4
  • 24
  • 38
  • Yes but i have configured everything in kotlin and just getting this error while trying to update the latest version getting error any way thanks – RockyGlobal Jun 24 '22 at 14:30
  • I am not familiar with the SDK you are using. To build Android apps that invoke AWS, see this AWS SDK for Kotlin tutorial that builds an Android app that invokes SNS (as an example of invoking AWS Services). https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/cross_SnsPublishSubscription_kotlin_topic.html – smac2020 Jun 24 '22 at 14:36
  • hi smac2020 i have updated the question can you please let me know the reason why i am getting the error while logging at only one single instance and the rest are successfully logging – RockyGlobal Jun 27 '22 at 07:02