Can golang develop android?

angryTom
Release: 2020-03-12 17:20:40
Original
5973 people have browsed it

Can golang develop android?

Can golang develop android?

Golang can develop android. To use golang to develop android, you need to download and install gomobile. There are two development methods, respectively. For: 1. Native application development; 2. Hybrid binding development.

The steps to develop android applications using GO language 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
Copy after login

Installation (needs to wait a few minutes)

gomobile init
Copy after login

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

a. Native application development

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

Android development

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

This command will generate an apk installation package named basic

$ gomobile install golang.org/x/mobile/example/basic
Copy after login

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/...
Copy after login

For more golang knowledge, please pay attention to thegolang tutorialcolumn on the PHP Chinese website.

The above is the detailed content of Can golang develop android?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!