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: Getting error in building GO using "org.golang.mobile.bind" plugin #13251

Closed
GhongadiAdinath opened this issue Nov 14, 2015 · 5 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@GhongadiAdinath
Copy link

Hi,
First of all, thanks for the good information on how to build go programs
I tried the example mentioned in the "https://go-review.googlesource.com/#/c/12800/ "

But, getting bellow error:

FAILURE: Build failed with an exception.

Where:
Build file '/home/SDL/gocode/src/SDL-SRC/build.gradle' line: 2

What went wrong:
A problem occurred evaluating root project 'SDL-SRC'.

No signature of method: build_4s3bi4u0rg0mg10bktcmg7ughp$_run_closure1.id() is applicable for argument types: (java.lang.String) values: [org.golang.mobile.bind]

Possible solutions: is(java.lang.Object), is(java.lang.Object), find(), find(), find(groovy.lang.Closure), find(groovy.lang.Closure)

build.gradle:

plugins {
id "org.golang.mobile.bind" version "0.2.1"
}

gobind {
/* The Go package path; must be under one of the GOPATH elements or
a relative to the current directory (e.g. ../../hello) */
pkg = "/home/SDL/gocode/src/SDL-SRC"

/* GOPATH where the Go package is; check go env */
GOPATH = "/home/SDL/gocode"

/* Absolute path to the go binary */
GO = "/usr/local/go/bin"

}

Please help me to resolve this issue

@ianlancetaylor ianlancetaylor changed the title Getting error in building GO using "org.golang.mobile.bind" plugin x/mobile: Getting error in building GO using "org.golang.mobile.bind" plugin Nov 14, 2015
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Nov 14, 2015
@ianlancetaylor
Copy link
Contributor

CC @crawshaw

@GhongadiAdinath
Copy link
Author

Hi,

I got above issue resolved, the issue was because of old gradle. I update the gradle to 2.4(from 1.12).
after this, issue is something else.

No such property: GO for class: org.golang.mobile.GobindExtension_Decorated
Possible solutions: pkg

Please help me to resolve this issue.

@crawshaw
Copy link
Member

In the snippet you posted you are using version 0.2.1 of the gradle plugin. The current version is 0.2.3. Please try that. Also note there is a GOMOBILE parameter to set. See the README.md in https://github.com/golang/mobile/tree/master/misc/androidstudio

@hyangah
Copy link
Contributor

hyangah commented Feb 18, 2016

Did the use of Gobind plugin 0.2.3 fix the issue?

@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jul 20, 2017
@eliasnaur
Copy link
Contributor

I'm closing this; there is no followup since 2016.

@golang golang locked and limited conversation to collaborators Mar 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

6 participants