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

gomobile build的更多相关文章

  1. golang gomobile 环境搭建

    1. 安装Go语言SDK https://www.golangtc.com/download 2. 配置系统变量这建立GOROOT和GOPATH两个目录,分别对应sdk所在目录与项目文件根目录 3.  ...

  2. Mac 下用 go 开发Android应用环境设置

    需要的工具 设置代理 请参考:http://www.cnblogs.com/ghj1976/p/5087049.html Mac 下命令行设置代理: export http_proxy=http:// ...

  3. golang开发android环境搭建_window

    golang开发android环境搭建介绍 一 安装依赖软件: git:版本管理 go:  go开发环境(版本>=1.5),可直接下载window版的go安装包. android studio: ...

  4. golang学习笔记18 用go语言编写移动端sdk和app开发gomobile

    golang学习笔记18 用go语言编写移动端sdk和app开发gomobile gomobile的使用-用go语言编写移动端sdk和app开发https://blog.csdn.net/u01249 ...

  5. 解决 Springboot Unable to build Hibernate SessionFactory @Column命名不起作用

    问题: Springboot启动报错: Caused by: org.springframework.beans.factory.BeanCreationException: Error creati ...

  6. [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform

    eclipse maven clean install 报错 1. 修改properties-->resource-->utf-8仍然报错 2.修改项目pom.xml文件,增加: < ...

  7. 解决 Could not find com.android.tools.build:gradle 问题

    今天拉同事最新的代码,编译时老是报如下错误: Error:Could not find com.android.tools.build:gradle:2.2.0.Searched in the fol ...

  8. 搭建TFS 2015 Build Agent环境(一)

    Download the build agent Downloading the build agent is really simple. Navigate to your TFS control ...

  9. Go build constraints

    Go语言有一个不(奇)错(葩)的设计,就是build constraints(构建约束).可以在源码中通过注释的方式指定编译选项,比如只允许在linux下,或者在386的平台上编译啊之类的:还可以通过 ...

随机推荐

  1. profiler跟踪事件存为表之后性能分析工具

    使用profiler建立跟踪,将跟踪结果存到表中,使用下面存储过程执行 exec temp_profiler 'tra_tablename'对表数据进行处理归类,然后进行性能分析 1.先建存储过程 2 ...

  2. 如何阅读Android系统源码-收藏必备

    对于任何一个对Android开发感兴趣的人而言,对于android系统的学习必不可少.而学习系统最佳的方法就如linus所言:"RTFSC"(Read The Fucking So ...

  3. 基于Unity3D云人脸监測技术

    笔者介绍:姜雪伟,IT公司技术合伙人,IT高级讲师.CSDN社区专家,特邀编辑,畅销书作者,国家专利发明人;已出版书籍:<手把手教你架构3D游戏引擎>电子工业出版社和<Unity3D ...

  4. findlibrary returned null产生的联想,Android ndk开发打包时我们应该怎样注意平台的兼容(x86,arm,arm-v7a)

    非常多朋友在开发Android JNI的的时候,会遇到findlibrary returned null的错误,由于某种原因,so没有打包到apk中.以下浅析下引起该错误的原因以及平台兼容性问题. A ...

  5. 数据库字符集与排序规则(Character Set And Collation)

    数据库需要适应各种语言和字符就需要支持不同的字符集(Character Set),每种字符集也有各自的排序规则(Collation). (注意:Collation原意为校对,校勘,但是根据实际使用场景 ...

  6. 工作总结 Rezor 里面的一些小知识----自定义类型 放在标签值中 会直接跳过去

    0 的时候不报错 1 的时候 报错了 原因 是 imagesname[i]  索引超出了 为什么在 上面 报错呢?  不在这里报错呢? 说明了  Rezor 对于 自定义的变量 放在标签值里的时候,调 ...

  7. spring4.3+mybatis3.4+freemark+log4j2+fastjson整合

    2017-7-1 更新 spring 版本 4.3.9  更新mybatis 为3.4.3 0.先写下文件结构防止配置放错地方 1.首先发下maven配置 <properties> < ...

  8. C#:列表视图操作类

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.W ...

  9. 温故而知新 chrome 浏览器一些小技巧、小细节

    1.console 模块如何换行? shift + enter即可. 2.有时候 network 没有分类标签(xhr.img.js.css)怎么办? 按下这个图标就可以显示出来了

  10. python 多线程 示例

    import threading import Queue q = Queue.Queue() from test import * def worker1(x, y): #假设耗时 执行完毕 大于三 ...