美文网首页
flutter 错误集合

flutter 错误集合

作者: smallLabel | 来源:发表于2019-11-14 18:22 被阅读0次
  • 在添加了sample_rsa后程序运行不起来
Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

Finding Podfile changes
  A cipher2
  A simple_rsa
  - Flutter
  - path_provider
  - sqflite

Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `cipher2` from `.symlinks/plugins/cipher2/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `simple_rsa` from `.symlinks/plugins/simple_rsa/ios`
-> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`

Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "simple_rsa":
  In Podfile:
    simple_rsa (from `.symlinks/plugins/simple_rsa/ios`)

Specs satisfying the `simple_rsa (from `.symlinks/plugins/simple_rsa/ios`)` 

解决方案:
引自:github
在iOS目录下的Podfile文件中添加一行config.build_settings['SWIFT_VERSION'] = '4.0',添加后是这样

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      config.build_settings['SWIFT_VERSION'] = '4.0'
    end
  end
end
  • 用fluro跳转页面后,页面黑屏了,其他页面显示正常
    原因:跳转后的页面不是Scaffold,用Scaffold包裹了一下好了,上个页面也是Scaffold,具体原理还不清楚,处于初学阶段

  • flutter.framework:Permission denied
    这是flutter的坑,从1.9+版本升级到1.10版本就可以解决

  • 记一个低级错误吧,在运行过程中总是崩溃,lost connect to device ,我是用的模拟器,网上的博客和flutter在github上的issue都是说在终端输入brew upgrade --fetch-HEAD usbmuxd就可以解决,不过我的还不行,最后直接用xcode运行程序,发现是没有在info.plist中填写相册权限

  • mac真机时报错 无法验证开发者

    如图 1578301604064.jpg

解决办法:如果是无法打开idevice_id,先在终端执行sudo spctl --master-disable,然后执行

sudo xattr -r -d com.apple.quarantine 【flutter解压后的目录】/flutter/bin/cache/artifacts/libimobiledevice/idevice_id
sudo xattr -r -d com.apple.quarantine 【flutter解压后的目录】/flutter/bin/cache/artifacts/libimobiledevice/idevicename
sudo xattr -r -d com.apple.quarantine 【flutter解压后的目录】/flutter/bin/cache/artifacts/libimobiledevice/idevicescreenshot
sudo xattr -r -d com.apple.quarantine 【flutter解压后的目录】/flutter/bin/cache/artifacts/libimobiledevice/idevicesyslog
sudo xattr -r -d com.apple.quarantine 【flutter解压后的目录】/flutter/bin/cache/artifacts/libimobiledevice/ideviceinfo

将其中【flutter解压后的目录】替换为flutter真实目录

如果是无法打开iproxy,也是按照上述办法,目录需要改变一下,在bin/cache/artifacts/usbmuxd目录下

相关文章

网友评论

      本文标题:flutter 错误集合

      本文链接:https://www.haomeiwen.com/subject/cffdictx.html