首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未定义符号: Swift.UInt8的标称类型描述符

未定义符号: Swift.UInt8的标称类型描述符
EN

Stack Overflow用户
提问于 2021-10-06 12:55:08
回答 1查看 1.3K关注 0票数 1

我正试图在Mini上运行一个带有苹果M1 chipset.The项目的本地应用程序,该项目在基于英特尔的系统上运行良好,但在M1上却没有运行。当我构建时,我会遇到以下错误。

代码语言:javascript
复制
Undefined symbol: nominal type descriptor for Swift.UInt8

Undefined symbol: nominal type descriptor for Swift._ContiguousArrayStorage

Undefined symbol: _swift_deletedMethodError

Undefined symbol: __swift_FORCE_LOAD_$_swiftsimd

Undefined symbol: _swift_deallocObject

Undefined symbol: _swift_getObjCClassMetadata

Undefined symbol: __swift_FORCE_LOAD_$_swiftAVFoundation

Undefined symbol: Swift.String.count.getter : Swift.Int

Undefined symbol: (extension in Foundation):Swift.StringProtocol.cString(using: (extension in Foundation):Swift.String.Encoding) -> [Swift.Int8]?

Undefined symbol: Foundation.Data._Representation.replaceSubrange(_: Swift.Range<Swift.Int>, with: Swift.UnsafeRawPointer?, count: Swift.Int) -> ()

Undefined symbol: type metadata accessor for Foundation.__DataStorage

Undefined symbol: type metadata accessor for Foundation.Data.RangeReference

Undefined symbol: Swift.Hasher.init(_seed: Swift.Int) -> Swift.Hasher

Undefined symbol: Swift.String.hash(into: inout Swift.Hasher) -> ()

Undefined symbol: Swift.Hasher._finalize() -> Swift.Int

Undefined symbol: Foundation._convertNSErrorToError(__C.NSError?) -> Swift.Error

Undefined symbol: static (extension in ObjectiveC):__C.NSObject.== infix(__C.NSObject, __C.NSObject) -> Swift.Bool

Undefined symbol: static (extension in Foundation):Swift.String._unconditionallyBridgeFromObjectiveC(__C.NSString?) -> Swift.String

Undefined symbol: _swift_beginAccess

Undefined symbol: static (extension in Foundation):Swift.Dictionary._unconditionallyBridgeFromObjectiveC(__C.NSDictionary?) -> [A : B]

Undefined symbol: _swift_getTypeByMangledNameInContextInMetadataState

Undefined symbol: __swiftEmptyDictionarySingleton

Undefined symbol: _swift_bridgeObjectRetain

Undefined symbol: Swift._StringGuts.grow(Swift.Int) -> ()

Undefined symbol: nominal type descriptor for Swift.AnyHashable

Undefined symbol: static Swift._DictionaryStorage.allocate(capacity: Swift.Int) -> Swift._DictionaryStorage<A, B>

Undefined symbol: Swift.String.append(Swift.String) -> ()

Undefined symbol: protocol witness table for Swift.AnyHashable : Swift.Hashable in Swift

Undefined symbol: _swift_initStackObject

Undefined symbol: _swift_getWitnessTable

Undefined symbol: (extension in Foundation):Swift.Dictionary._bridgeToObjectiveC() -> __C.NSDictionary

Undefined symbol: protocol witness table for Swift.String : Swift.Hashable in Swift

Undefined symbol: __swift_FORCE_LOAD_$_swiftDispatch

Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreImage

Undefined symbol: __swiftEmptyArrayStorage

Undefined symbol: Swift.KEY_TYPE_OF_DICTIONARY_VIOLATES_HASHABLE_REQUIREMENTS(Any.Type) -> Swift.Never

Undefined symbol: Foundation.NSLog(Swift.String, Swift.CVarArg...) -> ()

Undefined symbol: _swift_bridgeObjectRetain_n

Undefined symbol: (extension in Foundation):Swift.String._bridgeToObjectiveC() -> __C.NSString

Undefined symbol: _swift_bridgeObjectRelease

Undefined symbol: Foundation.Data._bridgeToObjectiveC() -> __C.NSData

Undefined symbol: _swift_allocObject

Undefined symbol: static (extension in Foundation):Swift.String.Encoding.utf8.getter : (extension in Foundation):Swift.String.Encoding

Undefined symbol: Swift._HashTable.previousHole(before: Swift._HashTable.Bucket) -> Swift._HashTable.Bucket

Undefined symbol: _swift_initStaticObject

Undefined symbol: protocol conformance descriptor for Swift.String : Swift.StringProtocol in Swift

Undefined symbol: associated type descriptor for Swift.ExpressibleByIntegerLiteral.IntegerLiteralType

Undefined symbol: type metadata for Swift.String

Undefined symbol: Swift._stringCompareWithSmolCheck(_: Swift._StringGuts, _: Swift._StringGuts, expecting: Swift._StringComparisonResult) -> Swift.Bool

Undefined symbol: type metadata for Swift.AnyHashable

Undefined symbol: (extension in Foundation):Swift.Error.localizedDescription.getter : Swift.String

Undefined symbol: nominal type descriptor for Swift.CollectionOfOne

Undefined symbol: _swift_isUniquelyReferenced_nonNull_native

Undefined symbol: __swift_FORCE_LOAD_$_swiftUIKit

Undefined symbol: protocol descriptor for Swift.ExpressibleByFloatLiteral

Undefined symbol: associated conformance descriptor for Swift.ExpressibleByIntegerLiteral.Swift.ExpressibleByIntegerLiteral.IntegerLiteralType: Swift._ExpressibleByBuiltinIntegerLiteral

Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreFoundation

Undefined symbol: value witness table for Builtin.UnknownObject

Undefined symbol: method descriptor for Swift.ExpressibleByFloatLiteral.init(floatLiteral: A.FloatLiteralType) -> A

Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreAudio

Undefined symbol: protocol descriptor for Swift.ExpressibleByIntegerLiteral

Undefined symbol: _swift_dynamicCast

Undefined symbol: protocol conformance descriptor for <A where A == Swift.UInt8> Swift.CollectionOfOne<A> : Foundation.ContiguousBytes in Foundation

Undefined symbol: value witness table for Builtin.Int32

Undefined symbol: type metadata accessor for (extension in Foundation):Swift.String.Encoding

Undefined symbol: _swift_retain

Undefined symbol: __swift_FORCE_LOAD_$_swiftMetal

Undefined symbol: Swift.AnyHashable._rawHashValue(seed: Swift.Int) -> Swift.Int

Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreGraphics

Undefined symbol: type metadata for Any

Undefined symbol: protocol witness table for Swift.Float : Swift._ExpressibleByBuiltinFloatLiteral in Swift

Undefined symbol: __swift_FORCE_LOAD_$_swiftFoundation

Undefined symbol: _swift_getForeignTypeMetadata

Undefined symbol: method descriptor for Swift.ExpressibleByIntegerLiteral.init(integerLiteral: A.IntegerLiteralType) -> A

Undefined symbol: nominal type descriptor for Swift._DictionaryStorage

Undefined symbol: static Swift._DictionaryStorage.copy(original: Swift.__RawDictionaryStorage) -> Swift._DictionaryStorage<A, B>

Undefined symbol: _swift_willThrow

Undefined symbol: _swift_endAccess

Undefined symbol: __swift_FORCE_LOAD_$_swiftObjectiveC

Undefined symbol: _swift_errorRelease

Undefined symbol: protocol witness table for Swift.Int : Swift._ExpressibleByBuiltinIntegerLiteral in Swift

Undefined symbol: _swift_getTypeByMangledNameInContext

Undefined symbol: (extension in Foundation):Swift.Array._bridgeToObjectiveC() -> __C.NSArray

Undefined symbol: associated type descriptor for Swift.ExpressibleByFloatLiteral.FloatLiteralType

Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreMedia

Undefined symbol: Foundation.__DataStorage.init(capacity: Swift.Int) -> Foundation.__DataStorage

Undefined symbol: __swift_FORCE_LOAD_$_swiftQuartzCore

Undefined symbol: _swift_release

Undefined symbol: static Swift._DictionaryStorage.resize(original: Swift.__RawDictionaryStorage, capacity: Swift.Int, move: Swift.Bool) -> Swift._DictionaryStorage<A, B>

Undefined symbol: associated conformance descriptor for Swift.ExpressibleByFloatLiteral.Swift.ExpressibleByFloatLiteral.FloatLiteralType: Swift._ExpressibleByBuiltinFloatLiteral

Undefined symbol: _swift_getErrorValue

Undefined symbol: __swift_FORCE_LOAD_$_swiftDarwin

我怎样才能解决这个问题。我已经尝试过添加Swift文件和桥文件。但work.Please帮不了我

Xcode版本: 13.0,React本机版本: 0.64.2,iOS模拟器15,Mac : 11.4

EN

回答 1

Stack Overflow用户

发布于 2022-04-29 12:45:14

对于那些仍有此问题的人,您可以尝试以下方法,因为它对我有用:

指向原始帖子的链接:https://dev.to/mngyuan/updating-react-native-projects-for-m1-mac-development-1mk4

我们将把arm64架构排除在构建之外。在“目标”下,选择您的项目“->构建设置->排除体系结构”,并添加用于调试和发布的任何IOS模拟器SDK : arm64。对你的Pods项目也做同样的事情。

如果您的项目由于某种原因设置了VALID_ARCHS,那么在这个阶段您也希望从项目(以及Pods项目)中删除该键。我们非常接近完成,但安装在您的豆荚中的Flipper版本可能还不够新,不足以包括M1 macs的修复程序。打开ios/Podfile并应用以下内容

  • use_flipper!
  • use_flipper!({ 'Flipper‘=> '0.75.0’}

更新你的口袋妖怪

cd ios/

如果您仍然有问题,可以重新安装所有的Pods

吊舱解体

吊舱更新

如果您执行了一个失败的构建,您可能需要像这样清除DerivedData

rm -rf ~/Library/Developer/Xcode/派生数据/

由于我运行的是reacti-native0.64,所以我还必须将它添加到我的pod文件中。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69466125

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档