Add Android bindings section.

Burcu Dogan 2015-08-03 16:24:29 -07:00
parent 7c3f351835
commit d5b916f48a

@ -104,7 +104,21 @@ $ go get -d golang.org/x/mobile/example/bind
### Building and deploying to Android ### 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 ### Building an deploying to iOS