flutter 环境搭建记录

1.Waiting for observatory port to be available 待解决
大概找到问题所在:https://github.com/flutter/flutter/issues/18409
由于我的机器是没有管理员权限导致:/usr/bin/log stream无法正常执行
由于没管理员权限,暂时没法验证方案。
尝试了一下iOS11以下的模拟器是可以正常debug的。

/// Launches the device log reader process on the host. 
 Future<Process> launchDeviceLogTool(IOSSimulator device) async { 
   // Versions of iOS prior to iOS 11 log to the simulator syslog file. 
   if (await device.sdkMajorVersion < 11) 
     return runCommand(<String>['tail', '-n', '0', '-F', device.logFilePath]); 
  
   // For iOS 11 and above, use /usr/bin/log to tail process logs. 
   // Run in interactive mode (via script), otherwise /usr/bin/log buffers in 4k chunks. (radar: 34420207) 
   return runCommand(<String>[ 
     'script', '/dev/null', '/usr/bin/log', 'stream', '--style', 'syslog', '--predicate', 'processImagePath CONTAINS "${device.id}"', 
   ]); 
 } 

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容