Golang Development Android App (i)-Go language Android app environment build

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Based on Golang's Android Dynamic library development, long ago Golang supported the development of Android on the dynamic library and application, Golang environment to build not to say, directly from the Gomobile start

Software dependencies

Golang, Gomobile, Jdk,android SDK

Gomobile

Gomobile is a Golang framework that can use Golang to develop native apps and dynamic libraries on Android, and through which we can generate AAR library files that can be called in an Android program.
The introduction of Gomobile can also be seen here: https://github.com/golang/go/wiki/Mobile

Gomobile Installation

Requirement is Golang version to be greater than 1.5 (I use the current latest version 1.7, currently Golang active, do not take the old version test)
Go get golang.org/x/mobile/cmd/gomobile
Gomobile relies on the NDK and is automatically downloaded via the init command:
Gomobile init-v

The Gomobile init plus-V parameter displays detailed installation information, including specific download links.

Download the corresponding NDK and openal in the wall may be stuck, the solution is to download the two files themselves, put in the $gopath/pkg/gomobile/dl/directory, my local is gomobile-ndk-r12b-linux-x86_64. tar.gz gomobile-openal-soft-1.16.0.1-ndk-r12b.tar.gz

After manual download, put it on $gopath/pkg/gomobile/dl/and execute Gomobile Init again he will finish the rest of the work himself.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.