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

原本可运行的工程 什么也没干过一段时间无法运行了? 还是macos系统更新导致的

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系统进行了大的版本更新导致的===lldb.target===变更导致的 升级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 ' flag, or use '-d all' to act on all devices.

你可能感兴趣的:(ios flutter 'NoneType' object has no attribute 'modules' 'NoneType' object has no attribute 'pro...)