FlutterFlutterFlutter

Flutter [!] No podspec found for

2019-05-28  本文已影响0人  Q14

执行 flutter run 报错信息如下

Building com.example.gmalphaFlutter for device (ios-release)...
Found saved certificate choice "iPhone Developer: ****". To clear, use "flutter config".
Signing iOS app for device deployment using developer identity: "iPhone Developer: ****""
Running pod install...                                              0.7s
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

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

    Finding Podfile changes
      - Flutter
      - FlutterPluginRegistrant
      - flutter_boost
      - xservice_kit

    Fetching external sources
    -> Fetching podspec for `Flutter` from `../.ios/Flutter/engine`
    [!] No podspec found for `Flutter` in `../.ios/Flutter/engine`

    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/external_sources/path_source.rb:14:in `block in fetch'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/user_interface.rb:86:in `titled_section'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer/analyzer.rb:854:in `fetch_external_source'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer/analyzer.rb:833:in `block (2 levels) in fetch_external_sources'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer/analyzer.rb:832:in `each'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer/analyzer.rb:832:in `block in fetch_external_sources'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer/analyzer.rb:831:in `fetch_external_sources'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer/analyzer.rb:111:in `analyze'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer.rb:398:in `analyze'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer.rb:221:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer.rb:220:in `resolve_dependencies'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/installer.rb:156:in `install!'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/command/install.rb:51:in `run'
    /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.0/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:22:in `load'
    /usr/local/bin/pod:22:in `<main>'

解决方案

找出本地flutter 安装目录
  1. echo $PATH 作者的 /Users/mac/development/flutter
  2. ls -a
  3. 删除 .pub-cache 目录里面的所有缓存
  4. cd /Users/mac/development/flutter/.pub-cache
  5. 再执行flutter run
贴张图
屏幕快照 2019-05-28 下午3.13.46.png

如果更新了flutter

可以采用暴利删除

cd ~/code/flutter_project  (进入到flutter项目中)
sudo rm -rf  .ios 
flutter build ios 就可以了 

如果还有问题 可以看这一篇内容

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

上一篇下一篇

猜你喜欢

热点阅读