reactnativecn / react-native-qq

308 stars 87 forks source link

已经全部按照要求添加了相关依赖,但还是报这个错误,在模拟器上使用的时候。 #35

Closed Darkhorse-Fraternity closed 7 years ago

Darkhorse-Fraternity commented 7 years ago

Undefined symbols for architecture i386: "_OBJCCLASS$_QQApiAudioObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiImageObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiInterface", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiNewsObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiTextObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiVideoObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_SendMessageToQQReq", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_SendMessageToQQResp", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_TencentOAuth", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

已经全部按照要求添加了相关依赖,但还是报这个错误,在模拟器上使用的时候。

Darkhorse-Fraternity commented 7 years ago

真机运行正常,看来只是模拟器上有问题

mogazheng commented 7 years ago

我也是这个问题

HiddenGithub commented 7 years ago

我也遇到了这个报错,可是我的不管在模拟器还是真机都跑不了!这个问题你怎么解决的,求指教

Darkhorse-Fraternity commented 7 years ago

ld: warning: ignoring file ../node_modules/react-native-qq/ios/RCTQQAPI/TencentOpenAPI.framework/TencentOpenAPI, missing required architecture i386 in file ../node_modules/react-native-qq/ios/RCTQQAPI/TencentOpenAPI.framework/TencentOpenAPI (3 slices) Undefined symbols for architecture i386: "_OBJCCLASS$_SendMessageToQQReq", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiVideoObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiAudioObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiNewsObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiImageObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiTextObject", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_SendMessageToQQResp", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_QQApiInterface", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) "_OBJCCLASS$_TencentOAuth", referenced from: objc-class-ref in libRCTQQAPI.a(RCTQQAPI.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

我只在模拟器上release 模式下碰到这个问题。rn0.40

imtcn commented 7 years ago

ld: symbol(s) not found for architecture x86_64

将 sdk 下的TencentOpenAPI.framework加入到项目中,并导入到Frameworks fix