尝试集成Firebase和RN GoogleSignin时出现“ pod安装”问题

时间:2019-12-28 14:42:47

标签: windows firebase react-native cocoapods google-signin

因此,有两个问题: 第一个是我使用

pod install

命令在我的本机项目中安装Pod。

导致特定错误的podfile内容:

pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'

此输出:

Installing unimodules:
 expo-app-loader-provider@8.0.0 from ../node_modules/expo-app-loader-provider/ios
 expo-constants@8.0.0 from ../node_modules/expo-constants/ios
 expo-error-recovery@1.0.0 from ../node_modules/expo-error-recovery/ios
 expo-file-system@8.0.0 from ../node_modules/expo-file-system/ios
 expo-font@8.0.0 from ../node_modules/expo-font/ios
 expo-keep-awake@8.0.0 from ../node_modules/expo-keep-awake/ios
 expo-linear-gradient@8.0.0 from ../node_modules/expo-linear-gradient/ios
 expo-location@8.0.0 from ../node_modules/expo-location/ios
 expo-permissions@8.0.0 from ../node_modules/expo-permissions/ios
 expo-sqlite@8.0.0 from ../node_modules/expo-sqlite/ios
 expo-web-browser@8.0.0 from ../node_modules/expo-web-browser/ios
 unimodules-barcode-scanner-interface@5.0.0 from ../node_modules/unimodules-barcode-scannerinterface/ios
 unimodules-camera-interface@5.0.0 from ../node_modules/unimodules-camera-interface/ios
 unimodules-constants-interface@5.0.0 from ../node_modules/unimodules-constants-interface/ios
 unimodules-core@5.0.0 from ../node_modules/@unimodules/core/ios
 unimodules-face-detector-interface@5.0.0 from ../node_modules/unimodules-face-detector-interface/ios
 unimodules-file-system-interface@5.0.0 from ../node_modules/unimodules-file-system-interface/ios
 unimodules-font-interface@5.0.0 from ../node_modules/unimodules-font-interface/ios
 unimodules-image-loader-interface@5.0.0 from ../node_modules/unimodules-image-loader-interface/ios
 unimodules-permissions-interface@5.0.0 from ../node_modules/unimodules-permissions-interface/ios
 unimodules-react-native-adapter@5.0.0 from ../node_modules/@unimodules/react-native-adapter/ios
 unimodules-sensors-interface@5.0.0 from ../node_modules/unimodules-sensors-interface/ios
 unimodules-task-manager-interface@5.0.0 from ../node_modules/unimodules-task-manager-interface/ios

Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `RNGestureHandler` from `../node_modules/react-native-gesture-handler/RNGestureHandler.podspec`
Fetching podspec for `RNReanimated` from `../node_modules/react-native-reanimated/RNReanimated.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing AppAuth (1.3.0)
Installing Crashlytics (3.14.0)

[!] Error installing Crashlytics
[!] Unable to locate the executable `unzip`

由于Podfile中的这一行而发生第二个错误:

pod 'RNGoogleSignin', :path => '../node_modules/react-native-google-signin'

它生成的错误:

<Similar list as in the above code>
Installing unimodules:
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `RNGestureHandler` from `../node_modules/react-native-gesture-handler/RNGestureHandler.podspec`
Fetching podspec for `RNReanimated` from `../node_modules/react-native-reanimated/RNReanimated.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing AppAuth (1.3.0)
Installing DoubleConversion (1.1.6)
Installing EXAppLoaderProvider (8.0.0)
Installing EXConstants (8.0.0)
Installing EXErrorRecovery (1.0.0)
Installing EXFileSystem (8.0.0)
Installing EXFont (8.0.0)
Installing EXKeepAwake (8.0.0)
Installing EXLinearGradient (8.0.0)
Installing EXLocation (8.0.0)
Installing EXPermissions (8.0.0)
Installing EXSQLite (8.0.0)
Installing EXWebBrowser (8.0.0)
Installing FBLazyVector (0.61.5)
Installing FBReactNativeSpec (0.61.5)
Installing Folly (2018.10.22.00)
Installing GTMAppAuth (1.0.0)
Installing GTMSessionFetcher (1.3.0)
Installing GoogleSignIn (5.0.2)

[!] Error installing GoogleSignIn
[!] C:/WINDOWS/system32/tar.exe xfz C:/Users/PREETS~1/AppData/Local/Temp/d20191228-9184-epkk3u/file.tgz -C C:/Users/PREETS~1/AppData/Local/Temp/d20191228-9184-epkk3u --force-local

tar.exe: Option --force-local is not supported
Usage:
  List:    tar.exe -tf <archive-filename>
  Extract: tar.exe -xf <archive-filename>
  Create:  tar.exe -cf <archive-filename> [filenames...]
  Help:    tar.exe --help

几天来我一直在努力解决这些错误。请帮忙。

1 个答案:

答案 0 :(得分:0)

所以,这个问题是不完整的。现在我已经完成了它并且我知道它的答案,我会自己回答。

无法在 Windows 操作系统上创建 iOS 应用。至少,不是直接通过命令行。