CDN: trunk 相对路径:CocoaPods-version.yml 存在!返回本地,因为检查仅在存储库更新中执行

Kau*_*ore 5 ios dart cocoapods android-studio flutter

我尝试了几种解决方案:

\n
    \n
  1. 删除 podfile.lock 并使用 pod install --repo-update 重建
  2. \n
  3. 删除所有 pod 文件并从头开始设置 pod
  4. \n
  5. 在我的目标“Runner”之前源“https://cdn.cocoapods.org/”
  6. \n
\n

但没有任何效果。需要帮忙!

\n

仅当我尝试从 UI 打开 Android Studio 时才会出现此错误。当我从终端打开 Android Studio 时,不会发生此错误。

\n

我目前正在使用 Android Studio Bumblebee | 2021年1月1日

\n

我的播客文件:

\n
# Uncomment this line to define a global platform for your project\nplatform :ios, '10.0'\n\n# CocoaPods analytics sends network stats synchronously affecting flutter build latency.\nENV['COCOAPODS_DISABLE_STATS'] = 'true'\n\nproject 'Runner', {\n'Debug' => :debug,\n'Profile' => :release,\n'Release' => :release,\n}\n\ndef flutter_root\ngenerated_xcode_build_settings_path = File.expand_path(File.join('..',  'Flutter',     'Generated.xcconfig'), __FILE__)\nunless File.exist?(generated_xcode_build_settings_path)\nraise "#{generated_xcode_build_settings_path} must exist. If you're running pod     install manually, make sure flutter pub get is executed first"\nend\n\nFile.foreach(generated_xcode_build_settings_path) do |line|\nmatches = line.match(/FLUTTER_ROOT\\=(.*)/)\nreturn matches[1].strip if matches\nend\nraise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"\nend\n\nrequire File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)\n\nflutter_ios_podfile_setup\n\nsource 'https://cdn.cocoapods.org/'\n\ntarget 'Runner' do\nuse_frameworks!\nuse_modular_headers!\n\nflutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))\nend\n\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n  flutter_additional_ios_build_settings(target)\n end\nend\n
Run Code Online (Sandbox Code Playgroud)\n

flutter运行时抛出的错误:

\n
CocoaPods' output:\n\xe2\x86\xb3\n  CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update\n\nError output from CocoaPods:\n\xe2\x86\xb3\n    WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.\n    Consider adding the following to ~/.profile:\n\n    export LANG=en_US.UTF-8\n    \n/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:30:in `report'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'\n    from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:396:in `handle_exception'\n    from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:337:in `rescue in run'\n    from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:324:in `run'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'\n    from /usr/local/bin/pod:23:in `load'\n    from /usr/local/bin/pod:23:in `<main>'\n/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:205:in `podfile'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:46:in `run'\n    from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'\n    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'\n    from /usr/local/bin/pod:23:in `load'\n    from /usr/local/bin/pod:23:in `<main>'\n\nError running pod install\nError launching application on iPhone 13.\n
Run Code Online (Sandbox Code Playgroud)\n

小智 5

有同样的问题,我关闭了 android studio,并从终端打开它,似乎解决了问题。

open /Applications/Android\ Studio.app
Run Code Online (Sandbox Code Playgroud)