我在本地机器上运行了一个Flask应用程序,我正在使用它作为颤振应用程序的后端,但是我得到了这个错误
SocketException (SocketException:无主机路由(OS错误:无主机路由,Errno = 113)
Future pix(String BackgroundImagePath, String originalImagePath) async {
final uri = Uri.parse('http://my desktop address:5000').replace(queryParameters: {
'original': originalImagePath,
'background': BackgroundImagePath,
});
final response = await http.get(uri);代替了localhost。
发布于 2022-02-16 14:22:16
尝试在AndroidManifest.xml中的<manifest>标记中添加这一行。我也有同样的问题,这解决了它。
<uses-permission android:name="android.permission.INTERNET"/>https://stackoverflow.com/questions/71142843
复制相似问题