stat cache file '/Users/superman/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphone...

今天跑一個(gè)新的Flutter項(xiàng)目報(bào)這個(gè)錯(cuò)誤:
stat cache file '/Users/superman/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos18.2-22C146-d5b9239ec3bf5b3adbecdf21472871e3.sdkstatcache' not found
可能跟xcode升級(jí)到16.2有關(guān)系吧!,flutter運(yùn)行iOS模擬器出現(xiàn)如下錯(cuò)誤

image.png

DerivedData緩存問題,讓刪除緩存.結(jié)果并沒有用.

[解決方法]

image.png

然并卵,編譯又報(bào)各個(gè)插件的錯(cuò)誤,始終運(yùn)行不起來。

其實(shí)這些都不是真正的錯(cuò)誤原因,直接跑安卓,universal_html插件報(bào)錯(cuò)如下:

../../../.pub-cache/hosted/pub.flutter-io.cn/universal_html-2.2.2/lib/src/html/dom/element_subclasses.dart:2752:30: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.

  • 'Object' is from 'dart:core'.
    final parsed = css.parse(text);

解決方法:

進(jìn)入到插件內(nèi)element_subclasses.dart將2752行改成下面這樣:

final text = this.text ?? "";

然后就跑起來了,不知道錯(cuò)誤報(bào)的也不準(zhǔn),一會(huì)報(bào)這個(gè)插件錯(cuò)誤找不到,一會(huì)報(bào)那個(gè)插件的錯(cuò)誤。

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容