App build failed with ``` undefined: paint & NewPaint ```
baxiry opened this issue · comments
go version :
go1.18.1 darwin/arm64
nuxui version :
nuxui@v0.1.0
os & cpu arch
darwin/arm64
What did you do?
nux build -target=iossimulator -bundleid="app.id" -teamid="YOURTEAMID" .
What did you expect to see?
Build the app successfully
What did you see instead?
App build failed with this error:
go/pkg/mod/nuxui.org/nuxui@v0.1.0/nux/paint.go:33:12: undefined: paint
go/pkg/mod/nuxui.org/nuxui@v0.1.0/nux/image_svg.go:114:10: undefined: NewPaint
@bashery It looks like your go env not handle build tag //go:build !android
correcttly
Try modify file nuxui/nux/paint_other.go
:
--//go:build !android
++//go:build (linux || windows || darwin) && (!android)
There is no file named paint_other.go .
I tried modifying path.go path_cairo.go path_darwin.go path_ios.go path_win.go
respectively, and the error persists.
Maybe I didn't understand the solution well or I got something wrong
@bashery is paint
not path
, paint_other.go
@bashery sorry, my bad, i check github file, it has not paint_other.go
git was not track a lot files
@bashery I pushed missing files, update samples, and build it
cd samples
git pull
cd hello
go mod tidy
go build .
I don't know why git untracked these files😅
The following paths are ignored by one of your .gitignore files:
nux
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
mustodo@nuxart nux % git add -f *.go
mustodo@nuxart nux % git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
new file: filedialog_android.go
new file: font_android.go
new file: paint_android.go
new file: paint_other.go
new file: path_android.go
but ignore file is
.DS_Store
.vscode
.stfolder
*.exe
*.out
*.app
*.apk
*.old
yes! it's working. Thank you so much
I found it caused by~/.gitignore_global
😅