Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile: go get golang.org/x/mobile/... reports errors #17750

Closed
hyangah opened this issue Nov 2, 2016 · 2 comments
Closed

x/mobile: go get golang.org/x/mobile/... reports errors #17750

hyangah opened this issue Nov 2, 2016 · 2 comments

Comments

@hyangah
Copy link
Contributor

hyangah commented Nov 2, 2016

% go get golang.org/x/mobile/...
package golang.org/x/mobile/bind/testpkg/javapkg
imports Java/java/lang/Float: unrecognized import path "Java/java/lang/Float" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/javapkg
imports Java/java/lang/Integer: unrecognized import path "Java/java/lang/Integer" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/javapkg
imports Java/java/lang/System: unrecognized import path "Java/java/lang/System" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/javapkg
imports Java/java/util/Collections: unrecognized import path "Java/java/util/Collections" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/javapkg
imports Java/java/util/jar/JarFile: unrecognized import path "Java/java/util/jar/JarFile" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/objcpkg
imports ObjC/Foundation: unrecognized import path "ObjC/Foundation" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/objcpkg
imports ObjC/Foundation/NSDate: unrecognized import path "ObjC/Foundation/NSDate" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/objcpkg
imports ObjC/Foundation/NSString: unrecognized import path "ObjC/Foundation/NSString" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/objcpkg
imports ObjC/QuartzCore/CAMediaTimingFunction: unrecognized import path "ObjC/QuartzCore/CAMediaTimingFunction" (import path does not begin with hostname)
package golang.org/x/mobile/bind/testpkg/objcpkg
imports ObjC/UIKit: unrecognized import path "ObjC/UIKit" (import path does not begin with hostname)

@hyangah hyangah added this to the Unreleased milestone Nov 2, 2016
@mirtchovski
Copy link
Contributor

instead of trying to compile everything recursively (and failing the tests, which aren't working even on the builders at the moment), you may want to install only the gomobile binary, which knows how to do the rest:

% go get golang.org/x/mobile/cmd/gomobile
% gomobile init

@gopherbot
Copy link

CL https://golang.org/cl/34956 mentions this issue.

@golang golang locked and limited conversation to collaborators Jan 17, 2018
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
Running go get golang.org/x/mobile/... results in errors because the
go tool fails to find the reverse generated Java ("Java/...") and
Objective-C ("ObjC/...") packages. Work around the errors by adding
the android and ios tags, respectively, to files importing those
packages.

The gobind gradle plugin is updated to pass along GOOS=android to
ensure the gobind tool continues to build Android reverse packages.

Fixes golang/go#17750

Change-Id: Id66a3c6cdfe249c6ed494192eb12195d6509332f
Reviewed-on: https://go-review.googlesource.com/34956
Reviewed-by: David Crawshaw <crawshaw@golang.org>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
Running go get golang.org/x/mobile/... results in errors because the
go tool fails to find the reverse generated Java ("Java/...") and
Objective-C ("ObjC/...") packages. Work around the errors by adding
the android and ios tags, respectively, to files importing those
packages.

The gobind gradle plugin is updated to pass along GOOS=android to
ensure the gobind tool continues to build Android reverse packages.

Fixes golang/go#17750

Change-Id: Id66a3c6cdfe249c6ed494192eb12195d6509332f
Reviewed-on: https://go-review.googlesource.com/34956
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants