请问我是一个愚蠢的错误,但这是我关于移动开发和反应的第一个项目。我对移动开发环境配置的了解较少。
我正在尝试在我的项目上进行分支集成,而在Branch.io的集成之后,iO构建对iOS失败了。
我遵循了反应本地分支官方页面中提到的步骤。为纯反应本应用程序安装反应新分支
我安装了Cocapods,并进行了所有配置iOS的设置
在运行
之后react-native run-ios
我有错误
PBXCp /Users/bibek/Desktop/canvas-mobile-app/node_modules/react-native-branch/ios/Branch-SDK/Fabric/Answers.h /Users/bibek/Desktop/canvas-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/include/Branch/Answers.h (in target: RNBranch)
cd /Users/bibek/Desktop/canvas-mobile-app/node_modules/react-native-branch/ios
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/bibek/Desktop/canvas-mobile-app/node_modules/react-native-branch/ios/Branch-SDK/Fabric/Answers.h /Users/bibek/Desktop/canvas-mobile-app/ios/build/Build/Products/Debug-iphonesimulator/include/Branch
error: /Users/bibek/Desktop/canvas-mobile-app/node_modules/react-native-branch/ios/Branch-SDK/Fabric/Answers.h: No such file or directory
PBXCp /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/ANSCompatibility.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch/ANSCompatibility.h (in target: RNBranch)
cd /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/ANSCompatibility.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch
error: /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/ANSCompatibility.h: No such file or directory
PBXCp /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Branch-SDK/BNCKeyChain.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch/BNCKeyChain.h (in target: RNBranch)
cd /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Branch-SDK/BNCKeyChain.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch
error: /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Branch-SDK/BNCKeyChain.h: No such file or directory
PBXCp /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/Fabric.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch/Fabric.h (in target: RNBranch)
cd /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/Fabric.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch
error: /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/Fabric.h: No such file or directory
** BUILD FAILED **
The following build commands failed:
PBXCp /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/Answers.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch/Answers.h
PBXCp /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/ANSCompatibility.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch/ANSCompatibility.h
PBXCp /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Branch-SDK/BNCKeyChain.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch/BNCKeyChain.h
PBXCp /Users/{user_name}/Desktop/{Project_name}/node_modules/react-native-branch/ios/Branch-SDK/Fabric/Fabric.h /Users/{user_name}/Desktop/{Project_name}/ios/build/Build/Products/Debug-iphonesimulator/include/Branch/Fabric.h
(4 failures)
对我来说,我使用npm作为软件包管理器,并使用纱线仅安装此软件包。
我通过删除所有NPM软件包并最终使用纱线安装并执行新的链接来解决它。有效。