2
0
mirror of synced 2025-02-22 22:38:18 +00:00
David Crawshaw f3dc0a9c65 go.mobile/example/basic: app that draws a triangle
This is the first example of an App written entirely in Go that
draws to the device screen. Build and run process is driven
entirely by all.bash, no need for the Android Studio button
mashing in the lib* examples.

LGTM=nigeltao
R=golang-codereviews, nigeltao, bryanturley
CC=golang-codereviews
https://golang.org/cl/130420043
2014-09-09 20:25:47 -04:00
2012-03-17 15:20:58 +11:00

The go.mobile repository holds libraries and build tools for Go on Android.

This is early stage work. The build system integration is not ready.
For now,

1. Install Android Studio.
2. Install the Android NDK.
3. Pick a home for the standalone NDK toolchain and set an environment variable:
	NDK_ROOT=$HOME/android/ndk-toolchain
4. Confiure the NDK toolchain:
	ndk/build/tools/make-standalone-toolchain.sh \
		--platform=android-9 --install-dir=$NDK_ROOT
5. Create an android App in studio, then set
	ANDROID_APP=$HOME/android/studio/yourapp/app

With these two environment variables, the make.bash script in
go.mobile/example/hello_jni builds a .so file and symlinks in
the necessary java files to the project.

To submit changes to this repository, see http://golang.org/doc/contribute.html.
Languages
Go 86.9%
Objective-C 4.7%
Java 4.6%
C 3.4%
HTML 0.3%
Other 0.1%