火盆塞子科多瓦插件把我逼上了墙!我的项目已经运行了几个月,直到我将cordova插件-firebasex从11.0.3-cli更新到14.1.0。这是我在运行Cordova平台添加ios后遇到的错误:
Failed to install 'cordova-plugin-firebasex': Error: pod: Command failed with exit code 31
at ChildProcess.whenDone (/Users/mmhayes/Documents/MyQCWeb/MyQC_v6_7/node_modules/cordova-common/src/superspawn.js:136:25)
at ChildProcess.emit (node:events:390:28)
at maybeClose (node:internal/child_process:1064:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
我的环境:
Cordova -v
11.0.0
Cordova platform ls
Installed platforms:
ios 6.2.0
Available platforms:
android ^10.1.1
browser ^6.0.0
electron ^3.0.0
osx ^6.0.0
Cordova plugin ls
cordova-plugin-firebase-analytics 6.1.0 "FirebaseAnalyticsPlugin"
cordova-plugin-firebase-dynamiclinks 6.1.3 "FirebaseDynamicLinksPlugin"
cordova-plugin-firebasex 14.1.0 "Google Firebase Plugin"
我相信这个问题与吊舱版本有关,但我不确定。网络上没有太多关于“退出代码31”的错误。不管有什么,我尝试了他们提出的解决方案,但没有运气。这包括运行
Cordova clean
Cordova plugin rm cordova-plugin-firebasex
Cordova plugin add cordova-plugin-firebasex
pod repo update
sudo gem install cocoa pods
我知道这是不言而喻的,但任何帮助都是非常感谢的!如果有帮助的话,我可以提供更多关于我的环境的信息。
编辑10/25 4:22下午
我项目的Podfile:
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
target 'My Quickcharge' do
project 'My Quickcharge.xcodeproj'
pod 'Firebase/Analytics', '~> 8.8.0'
pod 'Firebase/DynamicLinks', '~> 8.8.0'
pod 'Firebase/Core', '9.1.0'
pod 'Firebase/Auth', '9.1.0'
pod 'Firebase/Messaging', '9.1.0'
pod 'Firebase/Performance', '9.1.0'
pod 'Firebase/RemoteConfig', '9.1.0'
pod 'Firebase/InAppMessaging', '9.1.0'
pod 'FirebaseFirestore', :tag => '9.1.0', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git'
pod 'Firebase/Crashlytics', '9.1.0'
pod 'Firebase/Functions', '9.1.0'
pod 'Firebase/Installations', '9.1.0'
pod 'GoogleSignIn', '6.2.1'
pod 'GoogleTagManager', '7.4.1'
end
此外,当我试图运行pod install --repo-update
时,我会得到以下错误:
pod install --repo-update
Updating local specs repositories
CocoaPods 1.11.3 is available.
To update use: `gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.3
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/DynamicLinks":
In Podfile:
Firebase/DynamicLinks (= 6.33.0)
None of your spec sources contain a spec satisfying the dependency: `Firebase/DynamicLinks (= 6.33.0)`.
You have either:
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
发布于 2022-10-25 20:41:42
它实际上是在插件的文档中。
sudo gem install cocoapods-dependencies
cd platforms/ios/
pod dependencies
如果您收到这样的构建错误:您的规范源中没有一个包含满足依赖关系:Firebase/Analytics (~> 6.1.0), Firebase/Analytics (= 6.1.0, ~> 6.1.0)
的规范。
通过运行pod更新,确保您的本地Cocoapods是最新的,然后在/your_project/platforms/ios/
中运行pod安装。
https://github.com/dpa99c/cordova-plugin-firebasex#cocoapods
https://stackoverflow.com/questions/74199247
复制相似问题