From 96f72abd68a8ee35bbe43c77f068607afbaf1154 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Fri, 17 Jul 2015 13:50:40 -0700 Subject: [PATCH] cmd/gomobile: expect GoNativeActivity in external manifests gomobile expects GoNativeActivity, otherwise current_ctx_clazz stays null. Fixed cmd/gomobile/manifest.go to expect GoNativeActivity, and fixed the network example app. Change-Id: Idad6f9bec2fcbc876fbd6013009582868ad3e133 Reviewed-on: https://go-review.googlesource.com/12374 Reviewed-by: David Crawshaw --- cmd/gomobile/manifest.go | 4 ++-- example/network/AndroidManifest.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/gomobile/manifest.go b/cmd/gomobile/manifest.go index 5ab308b..75f3968 100644 --- a/cmd/gomobile/manifest.go +++ b/cmd/gomobile/manifest.go @@ -32,8 +32,8 @@ func manifestLibName(data []byte) (string, error) { if err := xml.Unmarshal(data, manifest); err != nil { return "", err } - if manifest.Activity.Name != "android.app.NativeActivity" { - return "", fmt.Errorf("can only build an .apk for NativeActivity, not %q", manifest.Activity.Name) + if manifest.Activity.Name != "org.golang.app.GoNativeActivity" { + return "", fmt.Errorf("can only build an .apk for GoNativeActivity, not %q", manifest.Activity.Name) } libName := "" for _, md := range manifest.Activity.MetaData { diff --git a/example/network/AndroidManifest.xml b/example/network/AndroidManifest.xml index 26edb27..312b4f3 100644 --- a/example/network/AndroidManifest.xml +++ b/example/network/AndroidManifest.xml @@ -18,9 +18,9 @@ license that can be found in the LICENSE file. http://developer.android.com/guide/topics/manifest/manifest-intro.html#perms --> - + -