You need to set the NDK path in gomobile init using the -ndk flag - if you follow these instructions, the path should be ~/Library/Android/sdk/ndk-bundle/:

gomobile init -ndk ~/Library/Android/sdk/ndk-bundle/

Then you can compile the APK:

gomobile build -target=android <PATH>

The path should be relative to $GOPATH/src. For example, if you install the basic example:

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

The build command should be:

gomobile build -target=android golang.org/x/mobile/example/basic

相关文章:

  • 2021-10-20
  • 2019-08-01
  • 2021-05-19
  • 2021-08-27
  • 2021-05-05
  • 2021-05-21
  • 2021-09-07
  • 2018-01-21
猜你喜欢
  • 2021-10-27
  • 2021-10-20
  • 2021-04-13
  • 2021-10-14
  • 2021-12-15
  • 2021-10-20
  • 2021-10-20
  • 2021-10-20
相关资源
相似解决方案