【问题标题】:Xcode is not detecting architectures on a gomobile (bind) produced frameworkXcode 未检测 gomobile(绑定)生成的框架上的架构
【发布时间】:2019-04-06 05:48:27
【问题描述】:

我有一个使用 gomobile 制作的框架。我已经在this issue 中写下了我的大部分细节。它可能与 Xcode/ld 有关,但我有一个不同版本的框架可以编译。我不确定这是否完全可行(尽管看起来确实如此)所以我想我应该放一个堆栈溢出 q 。问题中列出了文件的输出,但我也将其放在这里:

$ file Hello.framework/Hello
Hello.framework/Hello: Mach-O universal binary with 4 architectures: [arm_v7:current ar archive] [arm64]
Hello.framework/Hello (for architecture armv7):  current ar archive
Hello.framework/Hello (for architecture i386):   current ar archive
Hello.framework/Hello (for architecture x86_64): current ar archive
Hello.framework/Hello (for architecture arm64):  current ar archive

ld 对该文件不满意。

Warning ignoring file ./Hello.framework/Hello, file is universal (4 slices) but does not contain the x86_64 architecture: ./Hello.framework/Hello

【问题讨论】:

  • 这个成功了吗?我也有这个问题。
  • 不是最好的解决方案,但我备份了我的电脑并重新安装了 macOS...我无计可施。我认为新的移动包效果更好,它还包括位代码支持

标签: swift xcode go ld gomobile


【解决方案1】:

在我的情况下,出现问题是因为我想释放我的 mac 上的一些空间并删除了一些较旧的部署目标文件。在此之前,我曾经为 iOS 开发目标 10.3 构建,现在,由于我删除了这些文件,我不得不为 12.4 构建。

$(go env GOPATH)/bin/gomobile bind 之前调用$(go env GOPATH)/bin/gomobile init 对我有用。可能 init 会扫描/Users/<user>/Library⁩/Developer⁩/Xcode⁩/iOS DeviceSupport⁩ 中的文件,并在调用绑定之后正确使用它们。

【讨论】:

    猜你喜欢
    • 2021-05-26
    • 2012-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-26
    • 1970-01-01
    • 2011-03-19
    • 1970-01-01
    相关资源
    最近更新 更多