gomobile命令错误“没有设置android NDK路径”

gomobile命令错误“没有设置android NDK路径”,第1张

概述我在 Windows中使用Go版本1.7.5,当我尝试使用gomobile命令安装或绑定或构建时.它显示此错误 – “gomobile:没有设置 Android NDK路径.请通过安装Android SDK管理器或设置-ndk标志的ndk-bundle运行gomobile init.” 我已将NDK路径添加到系统变量$PATH,甚至手动安装了NDK,但仍然存在错误. 谢谢你的时间 !! 你需要使用 我在 Windows中使用Go版本1.7.5,当我尝试使用gomobile命令安装或绑定或构建时.它显示此错误 –
“gomobile:没有设置 Android NDK路径.请通过安装AndroID SDK管理器或设置-ndk标志的ndk-bundle运行gomobile init.”
我已将NDK路径添加到系统变量$PATH,甚至手动安装了NDK,但仍然存在错误.
谢谢你的时间 !!解决方法 你需要使用-ndk标志在gomobile init中设置NDK路径 – 如果你按照 these instructions,路径应该是〜/ library / AndroID / sdk / ndk-bundle /:
gomobile init -ndk ~/library/AndroID/sdk/ndk-bundle/

然后你可以编译APK:

gomobile build -target=androID <PATH>

路径应该相对于$GOPATH / src.例如,如果您安装基本示例:

go get -d golang.org/x/mobile/example/basic

构建命令应该是:

gomobile build -target=androID golang.org/x/mobile/example/basic
总结

以上是内存溢出为你收集整理的gomobile命令错误“没有设置android NDK路径”全部内容,希望文章能够帮你解决gomobile命令错误“没有设置android NDK路径”所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1137736.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存