libhellojni

command
v0.0.0-...-2824937 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2020 License: MIT, BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

This example program compiles to a gojni.so shared library, that can be loaded from an android application. Build it by configuring a cross compiler (see go.mobile/README) and then running:

ANDROID_APP=/path/to/Myapp/app ./make.bash

This program expects app/Go.java to be included in the Android project, along with a Java class named Demo defining

public static native void hello();

calling hello prints "Hello, world!" to logcat.

This is a very early example program that does not represent the intended development model for Go on Android. A language binding generator will follow, as will gradle build system integration. The result will be no make.bash, and no need to write C.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL