aka*_*saa 5 xcode swift react-native apple-m1
我第一次在我的 M1 Silicon Apple 计算机上使用“react-native init ReactNStudy”初始化了新的 react-native 项目。
地铁建设者工作没有任何问题。
在构建步骤时,我收到非常日志错误。像这样开始部分错误:
info Found Xcode workspace "ReactNCalisma.xcworkspace" info Launching iPhone 12 (iOS 14.4) info Building (using "xcodebuild -workspace ReactNCalisma.xcworkspace -configuration Debug -scheme ReactNCalisma
-destination id=E914C899-172A-45AE-AFB6-BEBA505887E1") (node:25639) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use `node --trace-warnings ...` to show where the warning was created) error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening ReactNCalisma.xcworkspace. Command line invocation:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace ReactNCalisma.xcworkspace -configuration Debug -scheme ReactNCalisma -destination id=E914C899-172A-45AE-AFB6-BEBA505887E1
Run Code Online (Sandbox Code Playgroud)
并像这样结束部分错误:
objc[25723]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1fc2be7a0) and ?? (0x1189b42b8). One of the two will be used. Which one is undefined.
objc[25723]: Class AMSupportURLSession is implemented in both ?? (0x1fc2be7f0) and ?? (0x1189b4308). One of the two will be used. Which one is undefined.
** BUILD FAILED **
The following build commands failed:
Ld /Users/USERNAME/Library/Developer/Xcode/DerivedData/ReactNCalisma-anxlznepgpgzoyfpokskqpwmffzt/Build/Products/Debug-iphonesimulator/ReactNCalisma.app/ReactNCalisma normal
(1 failure)
info Run CLI with --verbose flag for more details.
Run Code Online (Sandbox Code Playgroud)
之后,我尝试使用“xcodebuild”运行:
cd ios && xcodebuild
但在这部分我得到错误为:
fatal error: module map file
'/Users/USERNAME/Desktop/Projects/ReactNCalisma/ios/build/Release-iphoneos/YogaKit/YogaKit.modulemap'
not found
** BUILD FAILED **
The following build commands failed:
CompileC /Users/USERNAME/Desktop/Projects/ReactNCalisma/ios/build/ReactNCalisma.build/Release-iphoneos/ReactNCalisma.build/Objects-normal/arm64/ReactNCalisma_vers.o /Users/USERNAME/Desktop/Projects/ReactNCalisma/ios/build/ReactNCalisma.build/Release-iphoneos/ReactNCalisma.build/DerivedSources/ReactNCalisma_vers.c normal arm64 c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/USERNAME/Desktop/Projects/ReactNCalisma/ios/build/ReactNCalisma.build/Release-iphoneos/ReactNCalisma.build/Objects-normal/armv7/ReactNCalisma_vers.o /Users/USERNAME/Desktop/Projects/ReactNCalisma/ios/build/ReactNCalisma.build/Release-iphoneos/ReactNCalisma.build/DerivedSources/ReactNCalisma_vers.c normal armv7 c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Run Code Online (Sandbox Code Playgroud)
我试图用 Pod 删除并重新安装来解决,我检查了我的 Xcode 终端设置,但我无法解决这个问题。
这是M1的问题吗?我该如何解决这个问题?
我在 macbook M1 上遵循了这些步骤(cocoapoda 和 build 的问题):
1-在 Rosetta 中使用终端(确保所有终端都已关闭):转到 Finder --> 应用程序 --> 实用程序 --> 终端(然后右键单击获取信息 - 选中使用 Rosetta 打开)现在您可以打开终端并安装 Cocoapoda从航站楼
2- 将 Xcode 与 Rosetta 一起使用(确保 Xcode 已关闭):转到 Finder --> 应用程序 --> Xcode(然后右键单击获取信息 - 选中使用 Rosetta 打开)现在 Xcode/模拟器将像 Rosetta 一样工作
3-在Podfile(ios文件夹中)中评论这部分
# use_flipper!
# post_install do |installer|
# flipper_post_install(installer)
# end
Run Code Online (Sandbox Code Playgroud)
然后重新安装 Pod:
cd ios/
$ rm -rf build/
$ pod install
Run Code Online (Sandbox Code Playgroud)
检查这个视频:
| 归档时间: |
|
| 查看次数: |
3037 次 |
| 最近记录: |