登录
首页 >  Golang >  Go问答

Xcode 未检测 gomobile(绑定)生成的框架上的架构

来源:stackoverflow

时间:2024-04-13 13:03:31 462浏览 收藏

今日不肯埋头,明日何以抬头!每日一句努力自己的话哈哈~哈喽,今天我将给大家带来一篇《Xcode 未检测 gomobile(绑定)生成的框架上的架构》,主要内容是讲解等等,感兴趣的朋友可以收藏或者有更好的建议在评论提出,我都会认真看的!大家一起进步,一起学习!

问题内容

我有一个用 gomobile 制作的框架。我已经在这个问题上写下了我的大部分细节。这可能与 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

解决方案


就我而言,出现问题是因为我想释放 Mac 上的一些空间并删除了一些较旧的部署目标文件。在此之前,我曾经为 iOS 开发目标 10.3 构建,现在,由于我删除了这些文件,我必须为 12.4 构建。

$(go env GOPATH)/bin/gomobile bind 为我工作之前调用 $(go env GOPATH)/bin/gomobile init 。可能 init 会扫描 /Users//Library/Developer/Xcode/iOS DeviceSupport 中的文件,并通过以下调用正确绑定使用它们。

文中关于的知识介绍,希望对你的学习有所帮助!若是受益匪浅,那就动动鼠标收藏这篇《Xcode 未检测 gomobile(绑定)生成的框架上的架构》文章吧,也可关注golang学习网公众号了解相关技术文章。

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>