The 'Pods-App' target has transitive dependencies that include static binaries: during validation.
-> XXXModule (1.0.0)
- ERROR | [iOS] unknown: Encountered an unknown error (The 'Pods-App' target has transitive dependencies that include static binaries: (/private/var/folders/y_/3tb8h3hx3nz5d_g9s_7lcz940000gn/T/CocoaPods-Lint-20181114-4027-ysevf-XXXModule/Pods/XXXFoundation/XXXFoundation.framework)) during validation.
依赖错误
但是,有些非语法错误是不会给出错误原因的。这个时候可以使用“--verbose”来查看详细的验证过程来帮助定位错误。
pod lib lint --verbose
如下错误通过 --verbose 就可以找到原因。
-> XXXPushService (1.0.0)
- ERROR | [iOS] Encountered an unknown error (The 'Pods' target has transitive dependencies that include static binaries: (/private/var/folders/jz/b_m3k7ln47524cm__h3__mk00000gn/T/CocoaPods/Lint/Pods/XXXPushSDK/LibPush/libPush.a)) during validation.
这个错误是因为依赖库(s.dependency)包含了.a静态库造成的。虽然这并不影响Pod的使用,但是验证是无法通过的。可以通过 --use-libraries 来让验证通过。
pod lib lint --verbose --use-libraries
这种情况下使用 --use-libraries 虽然不会出现错误(error),但是有时候会带来一些警告(waring),警告同样是无法通过验证的。这时可以用 --allow-warnings 来允许警告。
pod lib lint --verbose --use-libraries --allow-warnings
网友评论