ios flutter 'NoneType' object has no attribute 'modules' 'NoneType' object has no attribute 'pro...

原本可運行的工程 什么也沒干過一段時間無法運行了? 還是macos系統(tǒng)更新導(dǎo)致的

1:Flutter 報錯 沒有運行模擬器 連接了iphone6s鎖屏 爆如上錯誤 開平后 還是報如上錯誤 模擬器可正常運行
xxx.py都是python的錯誤 xxx.py就是錯誤日志里面的"/tmp/9E74ECF2-A95A-4878-9E2A-5E8E1AB62979/fruitstrap_07900db410d645ac62a62d3ccb2eb4d1fa92e75c.py"

'NoneType' object has no attribute 'modules' 
'NoneType' object has no attribute 'process' 

分析懷疑是因為MacOS系統(tǒng)進行了大的版本更新導(dǎo)致的===lldb.target===變更導(dǎo)致的 升級xcode和flutter后解決

更新前的錯誤的xx.py

    process = lldb.target.ConnectRemote(listener, connect_url, None, error)

更新后的正確的xx.py

    process = debugger.GetSelectedTarget().ConnectRemote(listener, connect_url, None, error)

這種情況說明MacOS和flutter最好同步更新

Traceback (most recent call last):                                      
  File "/tmp/9E74ECF2-A95A-4878-9E2A-5E8E1AB62979/fruitstrap_07900db410d645ac62a62d3ccb2eb4d1fa92e75c.py", line 25, in connect_command
    process = lldb.target.ConnectRemote(listener, connect_url, None, error)
AttributeError: 'NoneType' object has no attribute 'ConnectRemote'      
Traceback (most recent call last):                                      
  File "/tmp/9E74ECF2-A95A-4878-9E2A-5E8E1AB62979/fruitstrap_07900db410d645ac62a62d3ccb2eb4d1fa92e75c.py", line 45, in run_command
    lldb.target.modules[0].SetPlatformFileSpec(lldb.SBFileSpec(device_app))
AttributeError: 'NoneType' object has no attribute 'modules'            
Traceback (most recent call last):                                      
  File "/tmp/9E74ECF2-A95A-4878-9E2A-5E8E1AB62979/fruitstrap_07900db410d645ac62a62d3ccb2eb4d1fa92e75c.py", line 74, in safequit_command
    process = lldb.target.process                                       
AttributeError: 'NoneType' object has no attribute 'process'  

Installing and launching...                                             
(This is taking an unexpectedly long time.)       ?^Clocalhost:hello_world admin$ flutter run 
More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

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