mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Bindings for Android: need to generate aar before importing
parent
a646dc77d1
commit
08e1eb3c3b
10
Mobile.md
10
Mobile.md
@ -132,17 +132,17 @@ $ go get -d golang.org/x/mobile/example/bind/...
|
||||
|
||||
Note: Go Mobile runs on the same architectures as Go, which currently means ARM, ARM64, 386 and amd64 devices and emulators. Notably, Android on MIPS devices is not yet supported.
|
||||
|
||||
* Launch Android Studio.
|
||||
* File > Import Project... to import the reference project from $GOPATH/src/golang.org/x/mobile/example/bind/android.
|
||||
|
||||

|
||||
|
||||
* Run the following command to generate the [aar](https://developer.android.com/studio/projects/android-library.html) file that is suitable for importing into Android projects:
|
||||
|
||||
```
|
||||
$ gomobile bind -o app/hello.aar -target=android golang.org/x/mobile/example/bind/hello
|
||||
```
|
||||
|
||||
* Launch Android Studio.
|
||||
* File > Import Project... to import the reference project from $GOPATH/src/golang.org/x/mobile/example/bind/android.
|
||||
|
||||

|
||||
|
||||
* Build and deploy the application to the device.
|
||||
|
||||
The app module contains the main application that invokes the `hello.Greetings`. When the application is launched the text view is updated with the string returned value.
|
||||
|
Loading…
x
Reference in New Issue
Block a user