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:
parent
eaed638e63
commit
35f7226e83
30
README
30
README
@ -1,16 +1,20 @@
|
||||
This is an empty Go subrepository. To create a new subrepository,
|
||||
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.
|
||||
The go.mobile repository holds libraries and build tools for Go on Android.
|
||||
|
||||
Then execute:
|
||||
go get code.google.com/p/go.newrepo
|
||||
cd $(go list -e -f '{{.Dir}}' code.google.com/p/go.newrepo)
|
||||
This is early stage work. The build system integration is not ready.
|
||||
For now,
|
||||
|
||||
The go get will complain about not finding source code, but it will
|
||||
successfully check out the repository.
|
||||
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
|
||||
|
||||
Edit the README (this file) to describe the new subrepository, and then
|
||||
use the usual hg change, mail, submit to send in the change.
|
||||
You will need to follow http://golang.org/doc/contribute.html#Code_review
|
||||
to enable the Code Review extension (pointing into your Go root).
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user