我的Flutter Android应用程序在WiFi上运行良好,但当我试图使用我的移动的数据时,出现了错误。
错误代码:
E/flutter (16859): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Connection failed
E/flutter (16859): #0 IOClient.send (package:http/src/io_client.dart:88:7)
E/flutter (16859): <asynchronous suspension>
E/flutter (16859): #1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:93:32)
E/flutter (16859): <asynchronous suspension>
E/flutter (16859): #2 _withClient (package:http/http.dart:164:12)
E/flutter (16859): <asynchronous suspension>
E/flutter (16859): #3 DashboardRepository.getDashboardSummaryResponse (package:my_app/repositories/screen_repository.dart:11:22)
E/flutter (16859): <asynchronous suspension>
E/flutter (16859): #4 _HomeState.myfunction(package:my_app/screens/screen.dart:102:20)
E/flutter (16859): <asynchronous suspension>
E/flutter (16859):
字符串
我需要运行我的应用程序与这两个(WiFi和移动的数据)..
1条答案
按热度按时间cnjp1d6j1#
进入android -> app -> src -> main -> AndroidManifest.xml。
在应用之前添加这一行:
字符串
<应用程序......