2
0
mirror of synced 2025-02-23 06:48:15 +00:00

go.mobile: update readme, add build instructions

LGTM=minux
R=golang-codereviews, minux
CC=golang-codereviews
https://golang.org/cl/109480043
This commit is contained in:
David Crawshaw 2014-07-23 09:46:19 -07:00
parent eaed638e63
commit 35f7226e83

30
README
View File

@ -1,16 +1,20 @@
This is an empty Go subrepository. To create a new subrepository, The go.mobile repository holds libraries and build tools for Go on Android.
visit http://code.google.com/p/go/adminSource and under repositories,
type the new name, check [x] Clone contents and select [empty] as
the one you want to clone.
Then execute: This is early stage work. The build system integration is not ready.
go get code.google.com/p/go.newrepo For now,
cd $(go list -e -f '{{.Dir}}' code.google.com/p/go.newrepo)
The go get will complain about not finding source code, but it will 1. Install Android Studio.
successfully check out the repository. 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
Edit the README (this file) to describe the new subrepository, and then With these two environment variables, the make.bash script in
use the usual hg change, mail, submit to send in the change. go.mobile/example/hello_jni builds a .so file and symlinks in
You will need to follow http://golang.org/doc/contribute.html#Code_review the necessary java files to the project.
to enable the Code Review extension (pointing into your Go root).
To submit changes to this repository, see http://golang.org/doc/contribute.html.