Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 尝试注册时出现平台异常_Android_Ios_Amazon Web Services_Flutter_Flutter Aws Amplify - Fatal编程技术网

Android 尝试注册时出现平台异常

Android 尝试注册时出现平台异常,android,ios,amazon-web-services,flutter,flutter-aws-amplify,Android,Ios,Amazon Web Services,Flutter,Flutter Aws Amplify,我试图注册一个用户使用一个简单的代码,我已经硬编码的电子邮件和密码以及。代码如下所示: Future<String> _Signup(BuildContext context) async { try { await Amplify.Auth.signUp( username: 'johndoe@gmail.com', password: 'john12345', options

我试图注册一个用户使用一个简单的代码,我已经硬编码的电子邮件和密码以及。代码如下所示:

Future<String> _Signup(BuildContext context) async { 
    try { 
        await Amplify.Auth.signUp( 
            username: 'johndoe@gmail.com', 
            password: 'john12345', 
            options: CognitoSignUpOptions( 
                userAttributes: {'email': 'johndoe@gmail.com'}
            )
        );
    } catch (e) { 
        return e.toString(); 
    } 
}
PlatformException (PlatformException(AuthException, Translating platform exception failed. Please take a look at https://github.com/aws-amplify/amplify-flutter/issues to see if there are any existing issues that match your scenario, and file an issue with the details of the bug if there isn't., {recoverySuggestion: See attached exception for more details., underlyingException: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.amazonaws.mobileconnectors.cognitoidentityprovider.CognitoUserPool.signUp(java.lang.String, java.lang.String, com.amazonaws.mobileconnectors.cognitoidentityprovider.CognitoUserAttributes, java.util.Map, java.util.Map, com.amazonaws.mobileconnectors.cognitoidentityprovider.handlers.SignUpHandler)' on a null object reference, message: Sign up failed}, null))