简体   繁体   中英

AWS Android initialization error | how to initialize

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:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM