为什么 CocoaPods 在 fastlane 中重新安装后仍然无效

时间:2021-03-14 06:58:37

标签: ios flutter cocoapods

我正在使用它来重新安装 CocoaPods,但仍然遇到此错误:

[06:47:32]: ▸ To see a detailed report, use the untranslated-messages-file
[06:47:32]: ▸ option in the l10n.yaml file:
[06:47:32]: ▸ untranslated-messages-file: desiredFileName.txt
[06:47:32]: ▸ <other option>: <other selection>
[06:47:32]: ▸ This will generate a JSON format file containing all messages that
[06:47:32]: ▸ need to be translated.
[06:47:34]: ▸ Running "flutter pub get" in cruise-open...                      2,090ms
[06:47:39]: ▸ Building com.earth.dolphin for device (ios-release)...
[06:47:41]: ▸ Automatically signing iOS for device deployment using specified development team in Xcode project: ***
[06:47:42]: ▸ Warning: CocoaPods is installed but broken. Skipping pod install.
[06:47:42]: ▸ You appear to have CocoaPods installed but it is not working.
[06:47:42]: ▸ This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
[06:47:42]: ▸ This can usually be fixed by re-installing CocoaPods.
[06:47:42]: ▸ To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[06:47:42]: ▸ CocoaPods not installed or not in valid state.

这是 fastlane 配置:

Dir.chdir "../.." do
    sh("gem","uninstall","cocoapods")
    sh("gem","install","cocoapods","-v 1.10.1")
    sh("flutter", "packages", "get")
    sh("flutter", "clean")
    sh("flutter", "build", "ios", "--release", "--no-sound-null-safety")
end

为什么 cocoapods 仍然不工作?这是完整的日志:

[06:46:29]: All required keys, certificates and provisioning profiles are installed ?
[06:46:29]: Setting Provisioning Profile type to 'ad-hoc'
[06:46:29]: -------------------------------------
[06:46:29]: --- Step: gem uninstall cocoapods ---
[06:46:29]: -------------------------------------
[06:46:29]: $ gem uninstall cocoapods
[06:46:29]: ▸ Gem 'cocoapods' is not installed
[06:46:29]: ----------------------------------------------
[06:46:29]: --- Step: gem install cocoapods -v\ 1.10.1 ---
[06:46:29]: ----------------------------------------------
[06:46:29]: $ gem install cocoapods -v\ 1.10.1
[06:46:33]: ▸ Successfully installed ruby-macho-1.4.0
[06:46:33]: ▸ Successfully installed nap-1.1.0
[06:46:33]: ▸ Successfully installed molinillo-0.6.6
[06:46:33]: ▸ Successfully installed fourflusher-2.3.1
[06:46:33]: ▸ Successfully installed escape-0.0.4
[06:46:33]: ▸ Successfully installed cocoapods-try-1.2.0
[06:46:33]: ▸ Successfully installed netrc-0.11.0
[06:46:33]: ▸ Successfully installed cocoapods-trunk-1.5.0
[06:46:33]: ▸ Successfully installed cocoapods-search-1.0.0
[06:46:33]: ▸ Successfully installed cocoapods-plugins-1.0.0
[06:46:33]: ▸ Successfully installed cocoapods-downloader-1.4.0
[06:46:33]: ▸ Successfully installed cocoapods-deintegrate-1.0.4
[06:46:33]: ▸ Building native extensions. This could take a while...
[06:47:11]: ▸ Successfully installed ffi-1.15.0
[06:47:11]: ▸ Successfully installed ethon-0.12.0
[06:47:11]: ▸ Successfully installed typhoeus-1.4.0
[06:47:11]: ▸ Successfully installed fuzzy_match-2.0.4
[06:47:11]: ▸ Successfully installed concurrent-ruby-1.1.8
[06:47:11]: ▸ A new major version is available for Algolia! Please now use the https://rubygems.org/gems/algolia gem to get the latest features.
[06:47:11]: ▸ Successfully installed algoliasearch-1.27.5
[06:47:11]: ▸ Successfully installed thread_safe-0.3.6
[06:47:11]: ▸ Successfully installed tzinfo-1.2.9
[06:47:11]: ▸ Successfully installed minitest-5.14.4
[06:47:11]: ▸ Successfully installed i18n-1.8.9
[06:47:11]: ▸ Successfully installed activesupport-5.2.4.5
[06:47:11]: ▸ Successfully installed cocoapods-core-1.10.1
[06:47:11]: ▸ Successfully installed cocoapods-1.10.1
[06:47:11]: ▸ Parsing documentation for ruby-macho-1.4.0
[06:47:11]: ▸ Installing ri documentation for ruby-macho-1.4.0
[06:47:11]: ▸ Parsing documentation for nap-1.1.0
[06:47:11]: ▸ Installing ri documentation for nap-1.1.0
[06:47:11]: ▸ Parsing documentation for molinillo-0.6.6
[06:47:11]: ▸ Installing ri documentation for molinillo-0.6.6
[06:47:11]: ▸ Parsing documentation for fourflusher-2.3.1
[06:47:11]: ▸ Installing ri documentation for fourflusher-2.3.1
[06:47:11]: ▸ Parsing documentation for escape-0.0.4
[06:47:11]: ▸ Installing ri documentation for escape-0.0.4
[06:47:11]: ▸ Parsing documentation for cocoapods-try-1.2.0
[06:47:11]: ▸ Installing ri documentation for cocoapods-try-1.2.0
[06:47:11]: ▸ Parsing documentation for netrc-0.11.0
[06:47:11]: ▸ Installing ri documentation for netrc-0.11.0
[06:47:11]: ▸ Parsing documentation for cocoapods-trunk-1.5.0
[06:47:11]: ▸ Installing ri documentation for cocoapods-trunk-1.5.0
[06:47:11]: ▸ Parsing documentation for cocoapods-search-1.0.0
[06:47:11]: ▸ Installing ri documentation for cocoapods-search-1.0.0
[06:47:11]: ▸ Parsing documentation for cocoapods-plugins-1.0.0
[06:47:11]: ▸ Installing ri documentation for cocoapods-plugins-1.0.0
[06:47:11]: ▸ Parsing documentation for cocoapods-downloader-1.4.0
[06:47:11]: ▸ Installing ri documentation for cocoapods-downloader-1.4.0
[06:47:11]: ▸ Parsing documentation for cocoapods-deintegrate-1.0.4
[06:47:11]: ▸ Installing ri documentation for cocoapods-deintegrate-1.0.4
[06:47:11]: ▸ Parsing documentation for ffi-1.15.0
[06:47:11]: ▸ Installing ri documentation for ffi-1.15.0
[06:47:11]: ▸ Parsing documentation for ethon-0.12.0
[06:47:11]: ▸ Installing ri documentation for ethon-0.12.0
[06:47:11]: ▸ Parsing documentation for typhoeus-1.4.0
[06:47:11]: ▸ Installing ri documentation for typhoeus-1.4.0
[06:47:11]: ▸ Parsing documentation for fuzzy_match-2.0.4
[06:47:11]: ▸ Installing ri documentation for fuzzy_match-2.0.4
[06:47:11]: ▸ Parsing documentation for concurrent-ruby-1.1.8
[06:47:11]: ▸ Installing ri documentation for concurrent-ruby-1.1.8
[06:47:11]: ▸ Parsing documentation for algoliasearch-1.27.5
[06:47:11]: ▸ Installing ri documentation for algoliasearch-1.27.5
[06:47:11]: ▸ Parsing documentation for thread_safe-0.3.6
[06:47:11]: ▸ Installing ri documentation for thread_safe-0.3.6
[06:47:11]: ▸ Parsing documentation for tzinfo-1.2.9
[06:47:11]: ▸ Installing ri documentation for tzinfo-1.2.9
[06:47:11]: ▸ Parsing documentation for minitest-5.14.4
[06:47:11]: ▸ Installing ri documentation for minitest-5.14.4
[06:47:11]: ▸ Parsing documentation for i18n-1.8.9
[06:47:11]: ▸ Installing ri documentation for i18n-1.8.9
[06:47:11]: ▸ Parsing documentation for activesupport-5.2.4.5
[06:47:11]: ▸ Installing ri documentation for activesupport-5.2.4.5
[06:47:11]: ▸ Parsing documentation for cocoapods-core-1.10.1
[06:47:11]: ▸ Installing ri documentation for cocoapods-core-1.10.1
[06:47:11]: ▸ Parsing documentation for cocoapods-1.10.1
[06:47:11]: ▸ Installing ri documentation for cocoapods-1.10.1
[06:47:11]: ▸ Done installing documentation for ruby-macho, nap, molinillo, fourflusher, escape, cocoapods-try, netrc, cocoapods-trunk, cocoapods-search, cocoapods-plugins, cocoapods-downloader, cocoapods-deintegrate, ffi, ethon, typhoeus, fuzzy_match, concurrent-ruby, algoliasearch, thread_safe, tzinfo, minitest, i18n, activesupport, cocoapods-core, cocoapods after 26 seconds
[06:47:11]: ▸ 25 gems installed
[06:47:11]: ----------------------------------
[06:47:11]: --- Step: flutter packages get ---
[06:47:11]: ----------------------------------
[06:47:11]: $ flutter packages get
[06:47:14]: ▸ Running "flutter pub get" in cruise-open...                      2,059ms
[06:47:15]: ---------------------------
[06:47:15]: --- Step: flutter clean ---
[06:47:15]: ---------------------------
[06:47:15]: $ flutter clean
[06:47:26]: ▸ Cleaning Xcode workspace...                                         9.9s
[06:47:31]: ▸ Cleaning Xcode workspace...                                         4.6s
[06:47:31]: ▸ Deleting build...                                                    1ms
[06:47:31]: ▸ Deleting .dart_tool...                                               9ms
[06:47:31]: ▸ Deleting .packages...                                                0ms
[06:47:31]: ▸ Deleting Generated.xcconfig...                                       0ms
[06:47:31]: ▸ Deleting flutter_export_environment.sh...                            0ms
[06:47:31]: ▸ Deleting Flutter.podspec...                                          0ms
[06:47:31]: ▸ Deleting .flutter-plugins-dependencies...                            0ms
[06:47:31]: ▸ Deleting .flutter-plugins...                                         0ms
[06:47:31]: ----------------------------------------------------------------
[06:47:31]: --- Step: flutter build ios --release --no-sound-null-safety ---
[06:47:31]: ----------------------------------------------------------------
[06:47:31]: $ flutter build ios --release --no-sound-null-safety
[06:47:32]: ▸ To see a detailed report, use the untranslated-messages-file
[06:47:32]: ▸ option in the l10n.yaml file:
[06:47:32]: ▸ untranslated-messages-file: desiredFileName.txt
[06:47:32]: ▸ <other option>: <other selection>
[06:47:32]: ▸ This will generate a JSON format file containing all messages that
[06:47:32]: ▸ need to be translated.
[06:47:34]: ▸ Running "flutter pub get" in cruise-open...                      2,090ms
[06:47:39]: ▸ Building com.earth.dolphin for device (ios-release)...
[06:47:41]: ▸ Automatically signing iOS for device deployment using specified development team in Xcode project: ***
[06:47:42]: ▸ Warning: CocoaPods is installed but broken. Skipping pod install.
[06:47:42]: ▸ You appear to have CocoaPods installed but it is not working.
[06:47:42]: ▸ This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
[06:47:42]: ▸ This can usually be fixed by re-installing CocoaPods.
[06:47:42]: ▸ To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
[06:47:42]: ▸ CocoaPods not installed or not in valid state.
+------------------------------------+--------------------------------------------------------+
|                                        Lane Context                                         |
+------------------------------------+--------------------------------------------------------+
| DEFAULT_PLATFORM                   | ios                                                    |
| PLATFORM_NAME                      | ios                                                    |
| LANE_NAME                          | ios beta                                               |
| KEYCHAIN_PATH                      | ~/Library/Keychains/***                     |
| ORIGINAL_DEFAULT_KEYCHAIN          | "/Users/runner/Library/Keychains/login.keychain-db"    |
| SIGH_PROFILE_TYPE                  | ad-hoc                                                 |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"com.earth.dolphin"=>"match AdHoc com.earth.dolphin"} |
+------------------------------------+--------------------------------------------------------+
[06:47:42]: Exit status of command 'flutter build ios --release --no-sound-null-safety' was 1 instead of 0.

To see a detailed report, use the untranslated-messages-file 
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection> 


This will generate a JSON format file containing all messages that 
need to be translated.
Running "flutter pub get" in cruise-open...                      2,090ms
Building com.earth.dolphin for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: ***
Warning: CocoaPods is installed but broken. Skipping pod install.
  You appear to have CocoaPods installed but it is not working.
  This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
  This can usually be fixed by re-installing CocoaPods.
To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

CocoaPods not installed or not in valid state.


+------+----------------------------------------------------+-------------+
|                            fastlane summary                             |
+------+----------------------------------------------------+-------------+
| Step | Action                                             | Time (in s) |
+------+----------------------------------------------------+-------------+
| 1    | default_platform                                   | 0           |
| 2    | xcode_select                                       | 0           |
| 3    | is_ci                                              | 0           |
| 4    | create_keychain                                    | 0           |
| 5    | is_ci                                              | 0           |
| 6    | match                                              | 1           |
| 7    | gem uninstall cocoapods                            | 0           |
| 8    | gem install cocoapods -v\ 1.10.1                   | 41          |
| 9    | flutter packages get                               | 4           |
| 10   | flutter clean                                      | 15          |
| ?   | flutter build ios --release --no-sound-null-safety | 11          |
+------+----------------------------------------------------+-------------+

[06:47:42]: fastlane finished with errors

0 个答案:

没有答案