flutter采坑之旅(常见错误)

2020-03-11  本文已影响0人  yyggzc521

Dart_LoadScriptFromKernel: The binary program does not contain 'main'

dart文件是不是没有保存就运行了啊

Failed to send crash report due to a network error: SocketException: OS Error: Operation timed out,

https://www.jianshu.com/p/b63f51544902

https://www.520mwx.com/view/42012

ideviceinfo returned an error:
ERROR: Could not connect to lockdownd, error code -18

https://www.jianshu.com/p/16e60ff5862b

Warning! This package referenced a Flutter repository via the .packages file that is no longer available. The repository from which the 'flutter' tool is currently executing will be used instead.
  running Flutter tool: /Users/gzc/Documents/developer/flutter
  previous reference  : /Users/doc/Flutter/flutter
This can happen if you deleted or moved your copy of the Flutter repository, or if it was on a volume that is no longer mounted or has been mounted at a different location. Please check your system path to verify that you are running the expected version (run 'flutter --version' to see which flutter is on your path).

https://www.jianshu.com/p/2e86be696679

The iOS Simulator deployment target
'IPHONEOS_DEPLOYMENT_TARGET' is set to 6.0, but the range of supported
deployment target versions is 8.0 to 13.0.99. (in target 'Masonry' from
project 'Pods')

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
     # config.build_settings['ENABLE_BITCODE'] = 'NO'
     if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 8.0
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
     end
    end
  end
end

Flutter.framework: Permission denied(flutter 1.9版本的bug)

/Users/gzc/Library/Developer/Xcode/DerivedData/Runner-aqukmzrvnfleavgbjhnqenumgfri/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework: Permission denied

解决方案

144行
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -exec chmod a-w "{}" \;
=>
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -iname '.h' -exec chmod a-w "{}" \;

Command PhaseScriptExecution failed with a nonzero exit code
解决方案:
删除pods、.lock文件 并清除缓存 重新pod install一下

在flutter项目中添加依赖可能出现如下错误:
A dependency may only have one source
位置没对齐的原因造成的

改为下面的样式

dependencies:
  flutter:
    sdk: flutter
  dio: ^3.0.9
上一篇 下一篇

猜你喜欢

热点阅读