Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter 1.17.0 iOS 编译失败 #234

Closed
cv0cv0 opened this issue May 9, 2020 · 18 comments
Closed

Flutter 1.17.0 iOS 编译失败 #234

cv0cv0 opened this issue May 9, 2020 · 18 comments

Comments

@cv0cv0
Copy link

cv0cv0 commented May 9, 2020

=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
Undefined symbols for architecture arm64:
"OBJC_CLASS$_PayReq", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXChooseInvoiceReq", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_OpenWebviewReq", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_SendAuthReq", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXChooseCardReq", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_AddCardToWXCardPackageReq", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXCardItem", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXAppExtendObject", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXMiniProgramObject", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXFileObject", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXEmoticonObject", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXVideoObject", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_SendAuthResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXMediaMessage", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_GetMessageFromWXReq", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXLaunchMiniProgramReq", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXApi", referenced from:
objc-class-ref in fluwx(FluwxPlugin.o)
objc-class-ref in fluwx(WXApiRequestHandler.o)
(maybe you meant: OBJC_CLASS$_WXApiRequestHandler)
"OBJC_CLASS$_WXImageObject", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_LaunchFromWXReq", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_PayResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_ShowMessageFromWXReq", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXSubscribeMsgReq", referenced from:
objc-class-ref in fluwx(FluwxPlugin.o)
"OBJC_CLASS$_SendMessageToWXReq", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXInvoiceAuthInsertResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXOpenBusinessWebViewResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXLaunchMiniProgramResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXChooseInvoiceResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXChooseCardResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_AddCardToWXCardPackageResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXMusicObject", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WXSubscribeMsgResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_SendMessageToWXResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXWebpageObject", referenced from:
objc-class-ref in fluwx(WXApiRequestHandler.o)
"OBJC_CLASS$_WechatAuthSDK", referenced from:
objc-class-ref in fluwx(FluwxAuthHandler.o)
"OBJC_CLASS$_WXNontaxPayResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
"OBJC_CLASS$_WXOpenBusinessWebViewReq", referenced from:
objc-class-ref in fluwx(FluwxPlugin.o)
"OBJC_CLASS$_WXPayInsuranceResp", referenced from:
objc-class-ref in fluwx(FluwxResponseHandler.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@zlg0613
Copy link

zlg0613 commented May 9, 2020

同遇到此问题,期待解决方案

@LvJson
Copy link

LvJson commented May 10, 2020

不是作者的问题,先把自己的项目重新构建下
没科学上网的要科学上网,不然很多东西下载不了

@zlg0613
Copy link

zlg0613 commented May 10, 2020

一直是可以科学上网的,应该是有依赖重复的问题,对IOS不熟悉,正在慢慢解决

@cv0cv0
Copy link
Author

cv0cv0 commented May 11, 2020

把ios项目重新弄一次就可以了。已经解决了

试过了,还是报这个错误。

@zlg0613
Copy link

zlg0613 commented May 12, 2020

IOS项目,先备份,再将工程必须文件等复制回去,重新run,就可以了。
已解决

@cv0cv0
Copy link
Author

cv0cv0 commented May 12, 2020

IOS项目,先备份,再将工程必须文件等复制回去,重新run,就可以了。
已解决

一样的错误。

@theecn
Copy link

theecn commented May 13, 2020

求解

@karedem
Copy link

karedem commented May 13, 2020

解决办法:
在Runner项目的 Targets - Build Phases - LinkBinaryWith Libraries 中添加对应缺失的库
这里是libWechatSDK.a
其他库找不到对应类同理

@karedem
Copy link

karedem commented May 13, 2020

是不是1.17.0对iOS依赖的传递可能不一样了
主项目里没法直接拿到plugin里的依赖?
有没有大佬解答一下

@JarvanMo
Copy link
Member

JarvanMo commented May 13, 2020 via email

@karedem
Copy link

karedem commented May 13, 2020

你是fluwx还是no pay。fluwx至始至终就没有遇到这个问题------------------ 原始邮件 ------------------ 发件人: "karedem"notifications@github.com 发送时间: 2020年5月13日(星期三) 下午5:07 收件人: "OpenFlutter/fluwx"fluwx@noreply.github.com; 抄送: "Subscribed"subscribed@noreply.github.com; 主题: Re: [OpenFlutter/fluwx] Flutter 1.17.0 iOS 编译失败 (#234) 是不是1.17.0对iOS依赖的传递可能不一样了 主项目里没法直接拿到plugin里的依赖? 有没有大佬解答一下 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

你是fluwx还是no pay。fluwx至始至终就没有遇到这个问题------------------ 原始邮件 ------------------ 发件人: "karedem"notifications@github.com 发送时间: 2020年5月13日(星期三) 下午5:07 收件人: "OpenFlutter/fluwx"fluwx@noreply.github.com; 抄送: "Subscribed"subscribed@noreply.github.com; 主题: Re: [OpenFlutter/fluwx] Flutter 1.17.0 iOS 编译失败 (#234) 是不是1.17.0对iOS依赖的传递可能不一样了 主项目里没法直接拿到plugin里的依赖? 有没有大佬解答一下 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

我的只是fluwx

@JarvanMo
Copy link
Member

JarvanMo commented May 13, 2020 via email

@cv0cv0
Copy link
Author

cv0cv0 commented May 13, 2020

解决办法:
在Runner项目的 Targets - Build Phases - LinkBinaryWith Libraries 中添加对应缺失的库
这里是libWechatSDK.a
其他库找不到对应类同理

我的找不到 libWechatSDK.a 。

@cv0cv0
Copy link
Author

cv0cv0 commented May 13, 2020

原来要添加文件。

@karedem
Copy link

karedem commented May 13, 2020

这个问题也有别的解决方案。 当然了更多的人是没有这个问题------------------ 原始邮件 ------------------ 发件人: "karedem"notifications@github.com 发送时间: 2020年5月13日(星期三) 下午5:12 收件人: "OpenFlutter/fluwx"fluwx@noreply.github.com; 抄送: "JarvanMo"468122151@qq.com;"Comment"comment@noreply.github.com; 主题: Re: [OpenFlutter/fluwx] Flutter 1.17.0 iOS 编译失败 (#234) 你是fluwx还是no pay。fluwx至始至终就没有遇到这个问题------------------ 原始邮件 ------------------ 发件人: "karedem"notifications@github.com 发送时间: 2020年5月13日(星期三) 下午5:07 收件人: "OpenFlutter/fluwx"fluwx@noreply.github.com; 抄送: "Subscribed"subscribed@noreply.github.com; 主题: Re: [OpenFlutter/fluwx] Flutter 1.17.0 iOS 编译失败 (#234) 是不是1.17.0对iOS依赖的传递可能不一样了 主项目里没法直接拿到plugin里的依赖? 有没有大佬解答一下 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. 你是fluwx还是no pay。fluwx至始至终就没有遇到这个问题------------------ 原始邮件 ------------------ 发件人: "karedem"notifications@github.com 发送时间: 2020年5月13日(星期三) 下午5:07 收件人: "OpenFlutter/fluwx"fluwx@noreply.github.com; 抄送: "Subscribed"subscribed@noreply.github.com; 主题: Re: [OpenFlutter/fluwx] Flutter 1.17.0 iOS 编译失败 (#234) 是不是1.17.0对iOS依赖的传递可能不一样了 主项目里没法直接拿到plugin里的依赖? 有没有大佬解答一下 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. 我的只是fluwx — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

是的

@cv0cv0
Copy link
Author

cv0cv0 commented May 13, 2020

解决办法:
在Runner项目的 Targets - Build Phases - LinkBinaryWith Libraries 中添加对应缺失的库
这里是libWechatSDK.a
其他库找不到对应类同理

=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Release ===
Undefined symbols for architecture arm64:
  "___cxa_begin_catch", referenced from:
      ___clang_call_terminate in libWeChatSDK.a(WechatAuthSDK.o)
  "operator new[](unsigned long)", referenced from:
      +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil NsDataEncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil DecodeWithBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil DecodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
  "std::terminate()", referenced from:
      ___clang_call_terminate in libWeChatSDK.a(WechatAuthSDK.o)
  "___gxx_personality_v0", referenced from:
      -[WechatAuthSDK init] in libWeChatSDK.a(WechatAuthSDK.o)
      -[WechatAuthSDK dealloc] in libWeChatSDK.a(WechatAuthSDK.o)
      -[WechatAuthSDK resetAll] in libWeChatSDK.a(WechatAuthSDK.o)
      -[WechatAuthSDK resetConnection] in libWeChatSDK.a(WechatAuthSDK.o)
      -[WechatAuthSDK Auth:nonceStr:timeStamp:scope:signature:schemeData:] in
      libWeChatSDK.a(WechatAuthSDK.o)
      -[WechatAuthSDK StopAuth] in libWeChatSDK.a(WechatAuthSDK.o)
      -[WechatAuthSDK sendAuthRequest:] in libWeChatSDK.a(WechatAuthSDK.o)
      ...
  "operator delete[](void*)", referenced from:
      +[WeChatApiUtil EncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil NsDataEncodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil DecodeWithBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
      +[WeChatApiUtil DecodeBase64:] in libWeChatSDK.a(WeChatApiUtil.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@cv0cv0
Copy link
Author

cv0cv0 commented May 13, 2020

你是fluwx还是no pay。fluwx至始至终就没有遇到这个问题------------------ 原始邮件 ------------------ 发件人: "karedem"notifications@github.com 发送时间: 2020年5月13日(星期三) 下午5:07 收件人: "OpenFlutter/fluwx"fluwx@noreply.github.com; 抄送: "Subscribed"subscribed@noreply.github.com; 主题: Re: [OpenFlutter/fluwx] Flutter 1.17.0 iOS 编译失败 (#234) 是不是1.17.0对iOS依赖的传递可能不一样了 主项目里没法直接拿到plugin里的依赖? 有没有大佬解答一下 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

在 Xcode 里编译也报错。

@cv0cv0
Copy link
Author

cv0cv0 commented Jun 11, 2020

Flutter: 1.17.3
fluwx: ^1.2.1+2
编译通过了。

@cv0cv0 cv0cv0 closed this as completed Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants