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

[Bug]编译iOS的时候报The 'Pods-Runner' target has transitive dependencies that include statically linked binaries #36

Closed
goodsiwen opened this issue Jul 3, 2019 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@goodsiwen
Copy link

编译iOS的时候报:
[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (/Users/siwen/MyProject/viiapp/ios/Pods/AlipaySDK-iOS/AlipaySDK.framework, /Users/siwen/MyProject/viiapp/ios/Pods/UMCAnalytics/UMAnalytics.framework, and /Users/siwen/MyProject/viiapp/ios/Pods/UMCCommon/UMCommon.framework)

请问如何解决?感谢

@goodsiwen goodsiwen added the bug Something isn't working label Jul 3, 2019
@rurico
Copy link
Owner

rurico commented Jul 3, 2019

参考中文文档中的这个部分
image
这个问题来源于swift和objective-c混编 后期我会将插件整体改用objective-c,彻底根除问题,以上是临时的解决方案。

@goodsiwen
Copy link
Author

又出现新的问题:

  • Regift does not specify a Swift version and none of the targets (Runner) integrating it have the SWIFT_VERSION attribute set. Please contact the author or set the SWIFT_VERSION attribute in at least one of the targets that integrate this pod.

加上:
pre_install do |installer|
installer.analysis_result.specifications.each do |s|
if s.name == 'Regift'
s.swift_version = '4.0'
# elsif s.name == 'other-Plugin'
# s.swift_version = '5.0'
# else
# s.swift_version = '4.0'
end
end
end

之后,出现连接错误:
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_UMConfigure", referenced from:
objc-class-ref in LcfarmFlutterUmengPlugin.o
"OBJC_CLASS$_MobClick", referenced from:
objc-class-ref in LcfarmFlutterUmengPlugin.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

真机是arm的连接错误。

@rurico
Copy link
Owner

rurico commented Jul 4, 2019

hi, 你可以通过简单的注释掉关于这个插件的所有代码,然后只添加 use_frameworks! 测试是否会遇到这个问题。

@goodsiwen
Copy link
Author

不用您这个压缩插件,注视掉use_frameworks,工程是可以正常运行的。

@rurico
Copy link
Owner

rurico commented Jul 4, 2019

所有的swift插件都会遇到这个问题,我希望您可以冷静下来看一下 详细说明

您注释掉了所有关于这个插件的代码之后,仅开启use_frameworks!报错可以证明不是由于这个插件所带来的,我希望你可以理解。

相反,你应该向报错的库提出issue,让他们能够适应目前flutter的生态,否则,以后遇到了别的swift插件也会出现同样的问题。

在前文我有提到过,迁移到objective-c才能避免这个问题,这也是我目前唯一能做的。

@rurico
Copy link
Owner

rurico commented Jul 4, 2019

如果你使用flutter_umengshare请把他的版本改为^0.1.16
flutter_alipay改成这样,如果还有问题,我可以帮你修。

flutter_alipay:
    git: https://github.com/TenkaiRuri/flutter_alipay

我测试了它,可以正常编译。

@goodsiwen
Copy link
Author

嗯,谢谢您,我试试

@goodsiwen
Copy link
Author

嗯,工程现在可以正常运行了,UP主太贴心了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants