cmd/gomobile: better AndroidManifest errors
Before: gomobile: EOF After: gomobile: error parsing /Users/crawshaw/src/golang.org/x/mobile/example/basic/AndroidManifest.xml: EOF Change-Id: I5e890e3ede5eef04c0a9f26a894bf450da19b3d9 Reviewed-on: https://go-review.googlesource.com/13442 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
1df827c65a
commit
fa69a4e270
|
@ -23,7 +23,8 @@ import (
|
|||
|
||||
func goAndroidBuild(pkg *build.Package) (map[string]bool, error) {
|
||||
libName := path.Base(pkg.ImportPath)
|
||||
manifestData, err := ioutil.ReadFile(filepath.Join(pkg.Dir, "AndroidManifest.xml"))
|
||||
manifestPath := filepath.Join(pkg.Dir, "AndroidManifest.xml")
|
||||
manifestData, err := ioutil.ReadFile(manifestPath)
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
return nil, err
|
||||
|
@ -46,7 +47,7 @@ func goAndroidBuild(pkg *build.Package) (map[string]bool, error) {
|
|||
} else {
|
||||
libName, err = manifestLibName(manifestData)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, fmt.Errorf("error parsing %s: %v", manifestPath, err)
|
||||
}
|
||||
}
|
||||
libPath := filepath.Join(tmpdir, "lib"+libName+".so")
|
||||
|
|
Loading…
Reference in New Issue