Flutter 问题合集

 收录Flutter踩坑中遇见的问题和解决办法。


无法Hot Reload,提示Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:8113/ws

解决方法:

打开 XCODE - Window - Devices and Simulators,找到用来调试的设备

取消勾选 Connect via network,如果之前就未打钩,先选择再取消勾选


网络请求数据返回 json.decode 报Json Formatter错误

在封装网络库的的时候发现 底层 response.data['data']时候当是一个jsonarray时候竟然无法直接取出'data',"Stirng not subType of Index "错误,原因是 此时拿到的不是一个json数据,没有双引号的假json数据,但是在jsonobject却可以,解决如下

if(callBack !=null) {  String res2Json  = json.encode(response.data);  Map map=json.decode(res2Json);  callBack(map["data"]);}


带了Flutter,提交AppStore报错

报错如下:

App Store Connect Operation Error

Unsupported Architectures. The executable for xxx.app/Frameworks/Flutter.framework contains unsupported architectures '[x86_64]'.

App Store Connect Operation Error

Invalid Segment Alignment. The app binary at 'xxx.app/Frameworks/Flutter.framework/Flutter' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version.

App Store Connect Operation Error

The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker.

解决方法:

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容