Zet*_*eth 6 xcode ios react-native expo
我有一个使用 React Native 和 Expo 构建的应用程序。\n我在 Expo SDK 版本 48 上使用它,刚刚升级到版本 49。现在,当我运行:eas build
然后eas submit
通过手机上的 TestFlight 更新我的应用程序时,它会立即崩溃。
我该如何解决这个错误 - 或者找出它发生的原因?
\n仅供参考:我的项目名称是hercules
.
然后我可以发送崩溃报告。
\n如果我在 App Store Connect 中找到它并单击“在 Xcode 中打开”:
\n\n然后我得到这样的堆栈跟踪:
\n\n我想这就是使用 React Native 和 Expo 的缺点。当像这样生成最终构建时,就很难理解堆栈跟踪。我无法理解上图中的内容。
\n我还从 Expo.dev“构建”菜单中检查了“构建日志”。有 9mb 的日志。这是开始和结束(没有时间戳,所以我不知道它是按升序还是降序排序):
\nCommand line invocation:\n /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace ./hercules.xcworkspace -scheme hercules -configuration Release -destination generic/platform=iOS -archivePath "/Users/expo/Library/Developer/Xcode/Archives/2023-07-09/hercules 2023-07-09 15.19.05.xcarchive" archive\nUser defaults from command line:\n IDEArchivePathOverride = /Users/expo/Library/Developer/Xcode/Archives/2023-07-09/hercules 2023-07-09 15.19.05.xcarchive\n IDEPackageSupportUseBuiltinSCM = YES\nPrepare packages\nComputing target dependency graph and provisioning inputs\nCreate build description\nBuild description signature: 2d65783870e59f558d579d6dedae71da\nBuild description path: /Users/expo/Library/Developer/Xcode/DerivedData/hercules-aiqjbxmtddzpiscjqedlczrddaee/Build/Intermediates.noindex/ArchiveIntermediates/hercules/IntermediateBuildFilesPath/XCBuildData/2d65783870e59f558d579d6dedae71da.xcbuilddata\nnote: Building targets in dependency order\nCreateBuildDirectory /Users/expo/Library/Developer/Xcode/DerivedData/hercules-aiqjbxmtddzpiscjqedlczrddaee/Build/Intermediates.noindex/ArchiveIntermediates/hercules/InstallationBuildProductsLocation\n cd /Users/expo/workingdir/build/ios\n builtin-create-build-directory /Users/expo/Library/Developer/Xcode/DerivedData/hercules-aiqjbxmtddzpiscjqedlczrddaee/Build/Intermediates.noindex/ArchiveIntermediates/hercules/InstallationBuildProductsLocation\nCreateBuildDirectory /Users/expo/Library/Developer/Xcode/DerivedData/hercules-aiqjbxmtddzpiscjqedlczrddaee/Build/Intermediates.noindex/ArchiveIntermediates/hercules/IntermediateBuildFilesPath\n...\n...\n...\nValidate /Users/expo/Library/Developer/Xcode/DerivedData/hercules-aiqjbxmtddzpiscjqedlczrddaee/Build/Intermediates.noindex/ArchiveIntermediates/hercules/InstallationBuildProductsLocation/Applications/hercules.app (in target \'hercules\' from project \'hercules\')\n cd /Users/expo/workingdir/build/ios\n builtin-validationUtility /Users/expo/Library/Developer/Xcode/DerivedData/hercules-aiqjbxmtddzpiscjqedlczrddaee/Build/Intermediates.noindex/ArchiveIntermediates/hercules/InstallationBuildProductsLocation/Applications/hercules.app\nTouch /Users/expo/Library/Developer/Xcode/DerivedData/hercules-aiqjbxmtddzpiscjqedlczrddaee/Build/Intermediates.noindex/ArchiveIntermediates/hercules/InstallationBuildProductsLocation/Applications/hercules.app (in target \'hercules\' from project \'hercules\')\n cd /Users/expo/workingdir/build/ios\n /usr/bin/touch -c /Users/expo/Library/Developer/Xcode/DerivedData/hercules-aiqjbxmtddzpiscjqedlczrddaee/Build/Intermediates.noindex/ArchiveIntermediates/hercules/InstallationBuildProductsLocation/Applications/hercules.app\nwarning: Run script build phase \'[CP-User] Generate app.manifest for expo-updates\' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target \'EXUpdates\' from project \'Pods\')\n** ARCHIVE SUCCEEDED **\n
Run Code Online (Sandbox Code Playgroud)\n48.0.18
我降级了版本package.json
(其中清理了被升级的新版本中的文件)。\n然后我删除了package-lock.json
和node_modules
。
\n然npm install
\n然npx expo install --fix
\n然npx expo start -c
\n然eas build
\n然eas submit
那行得通。没有崩溃。\xc2\xaf\\_(\xe3\x83\x84)_/\xc2\xaf
经过一天的努力,我在构建中修复了这个问题:这个问题实际上并不是由世博会引起的;它是由世博会引起的。它是由 的过时版本引起的expo-jest
,该版本失败是因为它引用了 的过时版本expo-config
。我最初在 expo-doctor 中忽略了它,因为它只是一个开发依赖项,所以我认为这并不重要。
您可以通过运行npx expo-doctor
并查看它是否提到有关 的内容来验证这是否是您的问题expo-config
。为了升级到 expo 49,我只是将"jest-expo"
package.json 中的行替换为"jest-expo": "^49.0.0"
.
归档时间: |
|
查看次数: |
1653 次 |
最近记录: |