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 <crawshaw@golang.org>
This commit is contained in:
parent
32ad533813
commit
96f72abd68
|
@ -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 {
|
||||
|
|
|
@ -18,9 +18,9 @@ license that can be found in the LICENSE file.
|
|||
http://developer.android.com/guide/topics/manifest/manifest-intro.html#perms -->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application android:label="network" android:hasCode="false" android:debuggable="true">
|
||||
<application android:label="network" android:debuggable="true">
|
||||
|
||||
<activity android:name="android.app.NativeActivity"
|
||||
<activity android:name="org.golang.app.GoNativeActivity"
|
||||
android:label="network"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
<meta-data android:name="android.app.lib_name" android:value="network" />
|
||||
|
|
Loading…
Reference in New Issue