Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.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
Flatter mobile(android emulator)http post不';t到达网站_Android_Flutter_Http_Mobile_Request - Fatal编程技术网

Flatter mobile(android emulator)http post不';t到达网站

Flatter mobile(android emulator)http post不';t到达网站,android,flutter,http,mobile,request,Android,Flutter,Http,Mobile,Request,我的http.post请求在我的手机(android模拟器)flutter上没有给出任何答案。 在浏览器上,它给出了典型的XMLHttpRequest错误,但这不是主题 final response = await http.post('https://www.notthewebsite.de/420/lalala.php', body: { "eMail": eMail.text, "password": password.text, });

我的http.post请求在我的手机(android模拟器)flutter上没有给出任何答案。 在浏览器上,它给出了典型的XMLHttpRequest错误,但这不是主题

final response = await http.post('https://www.notthewebsite.de/420/lalala.php', body: {
  "eMail": eMail.text,
  "password": password.text,
});

var datauser = json.decode(response.body);
而且它不会到达网站,因为如果它调用网站,它会在数据库中插入一些内容。 但是,当我手动启动网站时,数据库中的插入就起作用了


谢谢您的回答。

您可以在emulator上通过浏览器(如Chrome)访问网站吗

我一直需要使用-dns开关启动模拟器,否则名称解析将失败:

c:\AndroidSDK\emulator\emulator.exe -avd Android-28-Playstore-x64 -dns-server 8.8.8.8 
这对我很有帮助(第一个答案,提示MaciHat在android studio的AVD管理器中按show on disk进入文件夹,否则我找不到):