在过去的几天里,我一直在尝试使用eas-cli for ios来构建我的应用程序,但我遇到了一个问题,我一直无法解决。
这些是我在Run fastlane
部分遇到的问题:
⚠️ ld: duplicate method '+moduleName' in
┌─[category]: ExpoBridgeModule-42cab667980256920bca399fb283d4e0.o ExpoModulesCore/libExpoModulesCore.a
└─[class]: ExpoBridgeModule-f3e2a238b656aef6ef05761b66817421.o ExpoModulesCore/libExpoModulesCore.a
⚠️ ld: method '+UIDatePickerMode:' in category from /Users/expo/Library/Developer/Xcode/DerivedData/LogAirTheSimpleLogbook-dznymbkktakbescbylznhrjwttim/Build/Intermediates.noindex/ArchiveIntermediates/LogAirTheSimpleLogbook/BuildProductsPath/Release-iphoneos/React-Core/libReact-Core.a(RCTDatePickerManager.o) conflicts with same method from another category
⚠️ ld: method '+UIUserInterfaceStyle:' in category from /Users/expo/Library/Developer/Xcode/DerivedData/LogAirTheSimpleLogbook-dznymbkktakbescbylznhrjwttim/Build/Intermediates.noindex/ArchiveIntermediates/LogAirTheSimpleLogbook/BuildProductsPath/Release-iphoneos/React-CoreModules/libReact-CoreModules.a(RCTAlertManager.o) conflicts with same method from another category
⚠️ ld: method '+UIStatusBarAnimation:' in category from /Users/expo/Library/Developer/Xcode/DerivedData/LogAirTheSimpleLogbook-dznymbkktakbescbylznhrjwttim/Build/Intermediates.noindex/ArchiveIntermediates/LogAirTheSimpleLogbook/BuildProductsPath/Release-iphoneos/React-CoreModules/libReact-CoreModules.a(RCTStatusBarManager.o) conflicts with same method from another category
› Generating debug LogAirTheSimpleLogbook » LogAirTheSimpleLogbook.app.dSYM
› Executing LogAirTheSimpleLogbook » Bundle React Native code and images
虽然这些都是警告,所以我不确定他们是什么破坏了应用程序,然后我得到这个错误:
❌ error: File /Users/expo/Library/Developer/Xcode/DerivedData/LogAirTheSimpleLogbook-dznymbkktakbescbylznhrjwttim/Build/Intermediates.noindex/ArchiveIntermediates/LogAirTheSimpleLogbook/BuildProductsPath/Release-iphoneos/LogAirTheSimpleLogbook.app/main.jsbundle does not exist. This must be a bug with React Native, please report it here: https://github.com/facebook/react-native/issues
我在搜索了一段时间后尝试了多种方法,但到目前为止都没有效果。有人能有主意吗?
我还应该补充一点,当我第一次使用create-expo-app
创建时,我将App.js文件移动到了我创建的./src
文件夹中,但这给了我一些问题,所以我将其从那里拉出来。
如果有帮助的话,这些是我的包裹:
├── @babel/core@7.21.0
├── @babel/plugin-transform-object-assign@ extraneous
├── @react-native-async-storage/async-storage@1.17.11
├── @react-native-community/datetimepicker 2@ extraneous
├── @react-native-community/datetimepicker@6.7.3
├── @react-navigation/bottom-tabs@6.5.7
├── @react-navigation/native-stack@6.9.12
├── @react-navigation/native@6.1.6
├── babel-plugin-module-resolver@5.0.0
├── expo-status-bar@1.4.4
├── expo@48.0.5
├── firebase@9.17.2
├── react-native-async-storage@0.0.1
├── react-native-collapsible@1.6.0
├── react-native-dropdown-picker@5.4.4
├── react-native-flash-message@0.4.0
├── react-native-get-random-values@1.8.0
├── react-native-safe-area-context@4.5.0
├── react-native-screens@3.20.0
├── react-native@0.71.3
├── react@18.2.0
└── uuid@9.0.0
谢谢大家!
编辑:在错误信息下面,我还看到:
▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/Library/Developer/Xcode/DerivedData/LogAirTheSimpleLogbook-dznymbkktakbescbylznhrjwttim/Build/Intermediates.noindex/ArchiveIntermediates/LogAirTheSimpleLogbook/IntermediateBuildFilesPath/LogAirTheSimpleLogbook.build/Release-iphoneos/LogAirTheSimpleLogbook.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'LogAirTheSimpleLogbook' from project 'LogAirTheSimpleLogbook')
▸ (1 failure)
1条答案
按热度按时间oyxsuwqo1#
然后重新运行yarn react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios并生成main.jsbundle文件。
然后通过右键单击XCode〉〉{Your App}并选择Add files to“{Your App Name}”选项将文件添加到您的应用程序。然后选择新创建的main.jsbundle文件。检查文件是否添加到XCode〉〉{Your App}〉〉{Your App Target} Build Phases〉〉Copy Bundle Resources
如果文件存在,请重新构建应用程序。
请参考github中的解决方案:https://github.com/facebook/react-native/issues/32108