mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
Add Android bindings section.
parent
7c3f351835
commit
d5b916f48a
16
Mobile.md
16
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user