2
0
mirror of synced 2025-02-23 14:58:12 +00:00
Hana (Hyang-Ah) Kim 969a1bf7dd example/libhellojni: fix build and allow go get golang.org/x/mobile/...
Change-Id: Id0cd58705c882ea58cedbee5a6e9aff010c0ad4d
Reviewed-on: https://go-review.googlesource.com/1281
Reviewed-by: Andrew Gerrand <adg@golang.org>
2014-12-10 01:38:44 +00:00

31 lines
945 B
Go

// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
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.
*/
package main
import "golang.org/x/mobile/app"
func main() {
app.Run(app.Callbacks{})
}