diff --git a/Mobile.md b/Mobile.md index 7ad4bb95..d46e7de4 100644 --- a/Mobile.md +++ b/Mobile.md @@ -104,7 +104,21 @@ $ go get -d golang.org/x/mobile/example/bind ### Building and deploying to Android -TODO + +If you are using Android Studio, you can use the Gradle plugin to automate this process. + +1. Launch Android Studio. +2. File > Import Project... to import the reference project from $GOPATH/src/golang.org/x/mobile/example/bind/android. +3. Open hello/build.gradle to edit the absolute path to GOPATH and GO. +4. Build and deploy the application to the device. + +If you are not using Android Studio, in order to work with bindings for Android, you need to have [Android SDK](https://developer.android.com/sdk/index.html#Other) installed and ANDROID_HOME environment variable set. + +``` +$ gomobile bind -target=android golang.org/x/mobile/example/bind/hello +``` + +The command above will generate an aar that is importable by your IDEs. ### Building an deploying to iOS