go-flutter-desktop / go-flutter

Flutter on Windows, MacOS and Linux - based on Flutter Embedding, Go and GLFW.
https://hover.build/
BSD 3-Clause "New" or "Revised" License
5.85k stars 283 forks source link

Problem running "plugin_tutorial" and "texture_tutorial" examples #601

Closed tataDan closed 3 years ago

tataDan commented 3 years ago

I am able to run the "draggable_borderless", "keyboard_event", "pointer_demo", "stocks", and "text_demo" examples. However, when I attempt to run the "plugin_tutorial" and "texture_tutorial" examples, I get the following error:

hover: Compiling 'go-flutter' and plugins
go: github.com/go-flutter-desktop/go-flutter@v0.43.0: missing go.sum entry; to add it:
    go mod download github.com/go-flutter-desktop/go-flutter
hover: Go build failed: exit status 1

What is the best way to resolve this?

provokateurin commented 3 years ago

Running go mod download github.com/go-flutter-desktop/go-flutter as it says should solve it

tataDan commented 3 years ago

When I enter that I get the following response:

go mod download: module github.com/go-flutter-desktop/go-flutter: not a known dependency

pchampio commented 3 years ago

Did you cd into the go directory before running this command ?

tataDan commented 3 years ago

When I cd into the go directory and run go mod download github.com/go-flutter-desktop/go-flutter no error message appears and the datetime stamp of the go.sum file changes.

If I cd .. and run hover run I get the following error message:

hover: Compiling 'go-flutter' and plugins
../../../../go/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.43.0/application.go:10:2: missing go.sum entry for module providing package github.com/Xuanwo/go-locale (imported by github.com/go-flutter-desktop/go-flutter); to add:
    go get github.com/go-flutter-desktop/go-flutter@v0.43.0
../../../../go/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.43.0/internal/keyboard/keyboard.go:7:2: missing go.sum entry for module providing package github.com/go-gl/glfw/v3.3/glfw (imported by github.com/go-flutter-desktop/go-flutter); to add:
    go get github.com/go-flutter-desktop/go-flutter@v0.43.0
../../../../go/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.43.0/application.go:13:2: missing go.sum entry for module providing package golang.org/x/text/language (imported by github.com/go-flutter-desktop/go-flutter); to add:
    go get github.com/go-flutter-desktop/go-flutter@v0.43.0

If I cd into go directory and enter go get github.com/go-flutter-desktop/go-flutter@v0.43.0 I get the following error message:

# github.com/go-flutter-desktop/go-flutter/embedder
/usr/bin/ld: cannot find -lflutter_engine
collect2: error: ld returned 1 exit status

I realize that this could considered to be a low-priority issue, so if you think that it is not worth pursing, I would be willing to close it. Otherwise, I look forward to any further suggestions to resolve it.

provokateurin commented 3 years ago

Add -d to the last command.

tataDan commented 3 years ago

I cd into the texture_tutorial/go directory and entered go get -d github.com/go-flutter-desktop/go-flutter@v0.43.0. I then cd .. and enter hover run. This time the texture_tutorial example ran successfully. Thank you.