Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/207.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生成代码的AWS API网关问题_Android_Amazon Web Services_Crash_Aws Api Gateway - Fatal编程技术网

带有android生成代码的AWS API网关问题

带有android生成代码的AWS API网关问题,android,amazon-web-services,crash,aws-api-gateway,Android,Amazon Web Services,Crash,Aws Api Gateway,我是AWSAPI网关的新手,我们的云API工作得很好,但我面临着android为这些API生成代码的问题。 我按照以下步骤从下面的链接设置sdk 只要我从生成的代码中调用一个POST方法,应用程序就会崩溃 ApiClientFactory factory = new ApiClientFactory().endpoint("endpoint url"); final IDClient client = factory.build(IDClient.class); client.authenti

我是AWSAPI网关的新手,我们的云API工作得很好,但我面临着android为这些API生成代码的问题。 我按照以下步骤从下面的链接设置sdk

只要我从生成的代码中调用一个POST方法,应用程序就会崩溃

ApiClientFactory factory = new ApiClientFactory().endpoint("endpoint url");
final IDClient client = factory.build(IDClient.class);
client.authenticateUser(token); --> the app crashes here, token is a string parameter.
日志显示:
“AndroidRuntime:致命异常:AsyncTask#1”

我们没有使用IAM,因此我没有在APIClientFactory中设置凭据 我已经测试了CloudAPI,它在给定的输入参数下运行良好。因此,我很确定这是我调用导致问题的方法的方式,但我无法找到问题的根本原因

添加了应用程序崩溃时的堆栈跟踪

12-15 17:08:04.532 25761-27042/awsgw.com.awsgw I/AWSGS: doInBackground
12-15 17:08:04.552 25761-27042/awsgw.com.awsgw D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0
12-15 17:08:04.552 25761-27042/awsgw.com.awsgw D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=4; ai_family=0
12-15 17:08:04.552 25761-27042/awsgw.com.awsgw D/libc-netbsd: [getaddrinfo]: hostname=xxxxx; servname=(null); cache_mode=(null), netid=0; mark=0
12-15 17:08:04.552 25761-27042/awsgw.com.awsgw D/libc-netbsd: [getaddrinfo]: ai_addrlen=0; ai_canonname=xxxxx; ai_flags=1024; ai_family=0
12-15 17:08:04.562 25761-27042/awsgw.com.awsgw E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: awsgw.com.awsgw, PID: 25761
12-15 17:08:04.572 25761-27042/awsgw.com.awsgw I/Process: Sending signal. PID: 25761 SIG: 9

下面是应用程序崩溃时的stacktrace stacktrace没有显示与生成的客户端相关的任何错误。