?收錄Flutter踩坑中遇見的問題和解決辦法忧风。
無法Hot Reload,提示Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:8113/ws
解決方法:
打開 XCODE - Window - Devices and Simulators憔儿,找到用來調(diào)試的設(shè)備
取消勾選?Connect via network,如果之前就未打鉤,先選擇再取消勾選
網(wǎng)絡(luò)請求數(shù)據(jù)返回 json.decode 報Json Formatter錯誤
在封裝網(wǎng)絡(luò)庫的的時候發(fā)現(xiàn) 底層 response.data['data']時候當(dāng)是一個jsonarray時候竟然無法直接取出'data',"Stirng not subType of Index "錯誤,原因是 此時拿到的不是一個json數(shù)據(jù)辱士,沒有雙引號的假json數(shù)據(jù),但是在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.
解決方法: