随时间更新
Android
1. Could not find com.android.tools.build:gradle:2.3.3
这个错误,修改node-modules 里面。ali-onepass 的 安卓包里面的依赖,强制修改为2.3.0
2. Task :expo-modules-core:prepareBoost FAILED
Could not read /node_modules/expo-modules-core/android/build/downloads/boost_1_76_0.tar.gz
这个错误是因为 下载的这个包地址有问题。
解决方案如下 Fixed the Issue with Boost Library
Step 1: Update URL in ReactAndroid Build Script
- Navigate to the file:
/node_modules/react-native/ReactAndroid/build.gradle - Locate the following line:
https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz
- Replace it with:
https://archives.boost.io/release/${BOOST_VERSION.replace("_", ".")}/source/boost_${BOOST_VERSION}.tar.gz
Step 2: Update URL in Expo Modules Core
- Go to the file:
/node_modules/expo-modules-core/android/build.gradle. - Search for the same URL as in Step 1.
- Replace it with the new URL provided in Step 1.
Step 3: Apply the Patches
After making the changes, run the following commands to apply the patches:
patch-package react-native
patch-package expo-modules-core
IOS
- Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={ creationTimestamp = "2024-11-11T03:22:40Z"; httpCode = 200; protocolVersion = QH65B2; requestUrl = "developerservices2.apple.com/services/QH…"; responseId = "19f30a83-9098-404f-9b5a-d3bbe4890bc2"; resultCode = 1100; resultString = "Your session has expired. Please log in."; userLocale = "en_US"; userString = "Your session has expired. Please log in."; }, NSLocalizedDescription=Your session has expired. Please log in.} ** BUILD FAILED **
1)在Xcode退出所有已经登录的apple developer Account
2)退出Xcode
3)在终端执行如下命令:defaults write com.apple.dt.Xcode DVTDeveloperAccountUseKeychainService_2 -bool NO
4)重新打开Xcode,登录apple developer Account
这个错误跟账号有关
-
'folly/experimental/coro/Coroutine.h' file not found after upgrading to 就是这个文件找不到。
github.com/facebook/fo… -
执行pod install 报错
pod install
[!] Invalid `Podfile` file:
[!] Invalid `RNGestureHandler.podspec` file: undefined method 'exists?' for class File.
# from /Users/xxx/Desktop/code/xxx/node_modules/react-native-gesture-handler/RNGestureHandler.podspec:5
# -------------------------------------------
#
> isUserApp = File.exists?(File.join(__dir__, "..", "..", "node_modules", "react-native", "package.json"))
# if isUserApp
# -------------------------------------------
.
# from /Users/xxx/Desktop/code/alpha-saas-app/ios/Podfile:13
# -------------------------------------------
# target 'AlphaSaasApp' do
> config = use_native_modules!
#
# -------------------------------------------
➜ ios which ruby
/Users/xxx/.rbenv/shims/ruby
➜ ios which pod
/opt/homebrew/bin/pod
/opt/homebrew/opt/ruby/bin/ruby -v
ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [arm64-darwin23]
我本地ruby 版本是 2.7.5 但是 看了下 homebrew 下的 ruby 版本不对,
所以会报上面的错误,因为ruby 的高版本 废弃了 exists?
解决方案 ,卸载homebrew 的ruby ,使用 rbenv 的ruby 进行安装cocoapods
brew uninstall cocoapods
rbenv global 2.7.5
rbenv rehash
gem install cocoapods
rbenv rehash
which pod
# 应该是:~/.rbenv/shims/pod
- pod install 报错
[!] Error installing boost
Verification checksum was incorrect, expected 6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e, got 5e89103d9b70bba5c91a794126b169cb67654be2051f90cf7c22ba6893ede0ff
这个是因为 boost 安装地址有问题,需要修改。
node_modules/react-native/third-party-podspecs/boost.podspec 下的下载地址替换为 https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2