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

Can not get nuklear with golang #58

Open
TechComSpot opened this issue Jun 21, 2018 · 9 comments
Open

Can not get nuklear with golang #58

TechComSpot opened this issue Jun 21, 2018 · 9 comments

Comments

@TechComSpot
Copy link

I did go get github.com/golang-ui/nuklear/cmd/nk-android

but got:

xlab/android-go/app/app.go:20:2: build constraints exclude all Go files in /home/r3mb0/GoMobile/src/github.com/xlab/android-go/app/internal/callfn
screenshot at 2018-06-21 10-01-22

@jkvatne
Copy link
Contributor

jkvatne commented Jun 26, 2018

Try cloning the repository

cd %GOPATH%\src\github.com
mkdir golang-ui
cd golang-ui
git clone https://github.com/golang-ui/nuklear.git

@xlab
Copy link
Member

xlab commented Jun 26, 2018

@jkvatne go get clones first, so it should be cloned, but not building, since nk-android must be built using Android SDK toolchain, not by go build targeting the host machine.

@TechComSpot
Copy link
Author

TechComSpot commented Jun 26, 2018

Thank you @jkvatne for response, but the thing is that git will clone repository, I almost sure about that, but it should be cloned by a golang by default, in other case it usually displays the error like "There is no go files . . . bla..bla", but it doesn't :(

@xlab I believe that what you saying is I should install Android SDK firstly, but I see that there is at least one go file called main.
screenshot at 2018-06-26 19-06-45

@xlab
Copy link
Member

xlab commented Jun 26, 2018

@r3mb00 these files include android-go package that targets android/arm, not linux, so all files are excluded, see the error message on the first screen.

Also, this project has an old way to build android APK that is no longer supported by the newest SDK, so in order to proceed, you must build it like an example from android-go https://github.com/xlab/android-go/blob/master/examples/build-android.sh

You're stepping onto WIP territory, so process with caution and expertise.

@TechComSpot
Copy link
Author

You're stepping onto WIP territory, so process with caution and expertise.

@xlab oh...yeah I see.

Sorry for stupid questions and issues but to run any golang android example for me is almost like a sence of life.

I'm struglling with that so long and gets nothing so I believe I won't hadle it myself without a help.

@TechComSpot
Copy link
Author

TechComSpot commented Jun 29, 2018

Hi @xlab @jkvatne @Noofbiz.

When execute build-android.sh script I got:
screenshot at 2018-06-29 11-37-52

main.go:7:2: cannot find package "github.com/xlab/android-go/app" in any of:
/usr/lib/go-1.10/src/github.com/xlab/android-go/app (from $GOROOT)
/root/go/src/github.com/xlab/android-go/app (from $GOPATH)
Can you help guys?
With cp manipulation I fix that errors but got internal callfine :(
screenshot at 2018-06-29 12-04-37

@xlab please help, I can't handle myself, sorry :(

@xlab
Copy link
Member

xlab commented Jun 29, 2018

@r3mb00 env exports like GOOS and GOARCH cannot be separated on different commands. You have to execute them in one script (e.g. Makefile) or multiline

@TechComSpot
Copy link
Author

@xlab thanks for response.

But I'm really cannot get it.

I executed build-android.sh script but env exports like GOOS and GOARCH are executed by separate commands in that script, right?

@xlab
Copy link
Member

xlab commented Jun 29, 2018

@r3mb00 no, they are in the same command, also it doesn't use sudo and the script differs very much from the screens you've provided above

https://github.com/xlab/android-go/blob/master/examples/build-android.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants