Home  >  Article  >  Backend Development  >  Does go language support Android development?

Does go language support Android development?

青灯夜游
青灯夜游Original
2021-03-15 13:35:258837browse

go language supports Android development. Using golang to develop Android requires downloading and installing gomobile, and there are two development methods: 1. Native application development; 2. Hybrid binding development.

Does go language support Android development?

The operating environment of this tutorial: windows10 system, GO 1.11.2, thinkpad t480 computer.

About 2014, the developers of the go language mentioned that the android platform would introduce go development, and version 1.5 of the GO language also released go mobile

Using the GO language to develop android The application steps are as follows:

1. Download and install Go language (version 1.5)

2. Download and install gomobile

$ go get golang.org/x/mobile/cmd/gomobile

Installation (you need to wait a few minutes)

gomobile init

3. There are two ways to develop mobile applications in Golang

a. Native application development

$ go get -d golang.org/x/mobile/example/basic

Android development

$ gomobile build -target=android golang.org/x/mobile/example/basic

This command will generate a basic apk installation package

$ gomobile install golang.org/x/mobile/example/basic

This command will install the apk package to the connected android device

b.Hybrid binding development

$ go get -d golang.org/x/mobile/example/bind/...

Recommended learning:Golang tutorial

The above is the detailed content of Does go language support Android development?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn