2
0
mirror of synced 2025-02-22 22:38:18 +00:00

cmd/gomobile: improve error message if gomobile hasn't inited

gomobile init builds and install the toolchain for iOS builds now.
The error message shouldn't exclude the darwin/arm and darwin/arm64
related initialization.

Change-Id: Iebd5d7fb1466d9be694d8848c0fd8fa782850c79
Reviewed-on: https://go-review.googlesource.com/11239
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Burcu Dogan 2015-06-20 13:15:16 -07:00
parent 8fff803af0
commit df4a6521ad

View File

@ -357,15 +357,15 @@ func goAndroidBuild(src, libPath string) error {
}
}
if err != nil || gomobilepath == "" {
return errors.New("android toolchain not installed, run:\n\tgomobile init")
return errors.New("toolchain not installed, run:\n\tgomobile init")
}
verpath := filepath.Join(gomobilepath, "version")
installedVersion, err := ioutil.ReadFile(verpath)
if err != nil {
return errors.New("android toolchain partially installed, run:\n\tgomobile init")
return errors.New("toolchain partially installed, run:\n\tgomobile init")
}
if !bytes.Equal(installedVersion, version) {
return errors.New("android toolchain out of date, run:\n\tgomobile init")
return errors.New("toolchain out of date, run:\n\tgomobile init")
}
ndkccpath = filepath.Join(gomobilepath, "android-"+ndkVersion)