Coder Social home page Coder Social logo

mapleafgo / clash-for-flutter Goto Github PK

View Code? Open in Web Editor NEW
836.0 836.0 120.0 60.71 MB

Clash的桌面客户端,支持 windows、linux、macos

License: MIT License

Dart 81.18% Kotlin 2.09% Swift 1.09% Objective-C 0.01% CMake 6.50% C++ 8.20% C 0.48% Ruby 0.45%

clash-for-flutter's Introduction

clash-for-flutter's People

Contributors

gentlemadao avatar mapleafgo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clash-for-flutter's Issues

启动时初始化失败

报错如下:

DioException [bad response]: This exception was thrown because the response has a status code of 400 and
RequestOptions.validateStatus was configured to throw for this status code.
The status code of 400 has the following meaning: "Client error - the request contains bad syntax or cannot be
fulfilled"
Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.

是用不了

你好,我下载最新版本的到我的ubuntu20.04上面(新系统),端口号设定的全部是7890和电脑上的代理端口号一致,但一直报错显示端口已经被使用,该怎么解决呢?

有机会增加全局模式吗?

不是tun模式那种,只是浏览器的网站就行。比如微博显示ip变成代理的ip这样。
软件很好用,谢谢作者。

linux 平台 appimage运行报错

在linux 平台运行报错
/tmp/.mount_clash_5KHdJM/clash_for_flutter: error while loading shared libraries: libayatana-appindicator3.so.1: cannot open shared object file: No such file or directory

flutter 小白,请问如何在 Windows 上编译?

尝试编译了一下,有很多关于类似 main.mapper.g.dart 的报错,似乎是需要提前进行编译?

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
lib/main.dart(7,8): error GBB7C8005: Error when reading 'lib/main.mapper.g.dart': 绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆? [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/app/source/global_config.dart(20,6): error GBB7C8005: Error when reading 'lib/app/source/global_config.g.dart': 绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆? [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/app/pages/proxys/model/proxys_model.dart(6,6): error GBB7C8005: Error when reading 'lib/app/pages/proxys/model/proxys_model.g.dart': 绯荤粺鎵句笉鍒版寚瀹氱殑鏂囦欢銆? [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/app/source/global_config.dart(20,6): error GF2BD9131: Can't use 'lib/app/source/global_config.g.dart' as a part, because it has no 'part of' declaration. [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/app/pages/proxys/model/proxys_model.dart(6,6): error GF2BD9131: Can't use 'lib/app/pages/proxys/model/proxys_model.g.dart' as a part, because it has no 'part of' declaration. [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/app/source/global_config.dart(22,43): error G7D2AEF3C: Type '_$GlobalConfig' not found. [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/app/pages/proxys/model/proxys_model.dart(8,39): error G7D2AEF3C: Type '_$ProxysModel' not found. [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/app/pages/proxys/model/proxys_model.dart(8,7): error GA3B90A72: The type '_$ProxysModel' can't be mixed in. [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/app/source/global_config.dart(22,7): error GA3B90A72: The type '_$GlobalConfig' can't be mixed in. [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
lib/main.dart(10,3): error GB1B8BC88: Method not found: 'initializeJsonMapper'. [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
/D:/src/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_preview-0.5.5/lib/src/views/device_preview_style.dart(86,42): error GBF4691A2: No named parameter with the name 'nullOk'. [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(238,5): error MSB8066: “E:\CODES\clash_for_flutter\build\windows\CMakeFiles\7439d1e976dd7045d162e59478616393\flutter_windows.dll.rule;E:\CODES\clash_for_flutter\build\windows\CMakeFiles\8fde331e8cec18d55749bfa0b3fe29eb\flutter_assemble.rule”的自定义生成已退出,代码为 1。 [E:\CODES\clash_for_flutter\build\windows\flutter\flutter_assemble.vcxproj]
Exception: Build process failed.

无法启动

(clash_for_flutter:4059): Gdk-CRITICAL **: 10:52:37.901: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed

(clash_for_flutter:4059): Gtk-WARNING **: 10:52:37.903: usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-fcitx5.so)

(clash_for_flutter:4059): Gtk-WARNING **: 10:52:37.903: Loading IM context type 'fcitx' failed
libGL error: MESA-LOADER: failed to open crocus: /usr/lib/dri/crocus_dri.so: 无法打开共享对象文件: 没有那个文件或目录 (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: crocus
libGL error: MESA-LOADER: failed to open crocus: /usr/lib/dri/crocus_dri.so: 无法打开共享对象文件: 没有那个文件或目录 (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: crocus
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: 无法打开共享对象文件: 没有那个文件或目录 (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast

** (clash_for_flutter:4059): WARNING **: 10:52:37.942: Failed to start Flutter renderer: 无法创建 GL 上下文

Please support adding .yaml profile manually

I have touble with fetching profile through subscription sometimes, and I also append it with my personal rule sets too.I believe it would better if clash-for-flutter supported manual profile.
Anyway, Thanks for the work!

Please add support for special character

[ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Error on line 902, column 11: Unexpected character.

902 │ name: 🔰国外流量
│ ^

#0 Parser.parse (package:yaml/src/parser.dart:59)
#1 Loader._loadMapping (package:yaml/src/loader.dart:166)
#2 Loader._loadNode (package:yaml/src/loader.dart:89)
#3 Loader._loadSequence (package:yaml/src/loader.dart:143)
#4 Loader._loadNode (package:yaml/src/loader.dart:87)
#5 Loader._loadMapping (package:yaml/src/loader.dart:166)
#6 Loader._loadNode (package:yaml/src/loader.dart:89)
#7 Loader._loadDocument (package:yaml/src/loader.dart:65)
#8 Loader.load (package:yaml/src/loader.dart:57)
#9 loadYamlDocument (package:yaml/yaml.dart:69)
#10 loadYamlNode (package:yaml/yaml.dart:54)
#11 loadYaml (package:yaml/yaml.dart:41)
#12 _ConfigFileBase.start (package:clash_for_flutter/app/source/global_config.dart:167)

#13 _ConfigFileBase.openProxy (package:clash_for_flutter/app/source/global_config.dart:179)

#14 AsyncAction.run (package:mobx/src/api/async/async_action.dart:28)

希望增加clash配置文件负载均衡功能

使用普通clash配置文件时能够读出内容并使用,但是当导入修改增加负载均衡的配置文件时,不显示配置文件内容(或无法读出)导致配置文件不能使用,无法科学上网

macOS编译运行时动态库问题

error: /Users/kale/dev/flutterProjects/clash-for-flutter/macos/Frameworks/libclash.dylib: No such file or directory (in target 'Runner' from project 'Runner')

已经根据readme中的流程运行了指令,运行时出现。

Exception: Unable to generate build files

我用的是Deepin V20 community 按照readme说的做了一遍
flutter run -d linux
用这个命令等时候出现了这个错误,想请教一下是否是系统的问题呢?

mac平台hover run --debug报错,build也是报同样的错

❯ flutter doctor -v
[✓] Flutter (Channel master, 2.5.0-6.0.pre.29, on Mac OS X 10.15.7 19H524 darwin-x64, locale zh-Hans-CN)
• Flutter version 2.5.0-6.0.pre.29 at /usr/local/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 6876c52b5b (28 hours ago), 2021-08-08 15:34:09 -0700
• Engine revision c0e59bc7b6
• Dart version 2.14.0 (build 2.14.0-383.0.dev)

❯ go version
go version go1.16.3 darwin/amd64

构建报错信息

❯ hover run --debug
hover: Downloading engine for platform darwin-debug_unopt at version c0e59bc7b65e2330b2be9d9f2a8a1515b968a55c...
Download completed in 22.79s
Download completed in 45.79s
hover: Cleaning the build directory
hover: ⚠ The go-flutter project tries to stay compatible with the beta channel of Flutter.
hover: ⚠ It's advised to use the beta channel: flutter channel beta
hover: Bundling flutter app
Running "flutter pub get" in clash-for-flutter... 2,559ms

💪 Building with sound null safety 💪

hover: Compiling 'go-flutter' and plugins
hover: Successfully compiled executable binary for darwin
hover: Build finished, starting app...
hover: Running clash_for_flutter in debug_unopt mode
go-flutter: WARNING error creating the resource window: VersionUnavailable: NSGL: Failed to create OpenGL context
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(102)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
[ERROR:flutter/shell/platform/embedder/embedder_surface_gl.cc(102)] Could not create a resource context for async texture uploads. Expect degraded performance. Set a valid make_resource_current callback on FlutterOpenGLRendererConfig.
go-flutter: calculated pixelRatio limited to a minimum of 1.0. metrics: {"dpi":94.14671814671813,"monitorWidthMm":518,"monitorWidthSc":1920,"mscpi":94.14671814671813,"pixelRatio":0.5884169884169883,"ppsc":1,"windowWidthPx":900,"windowWidthSc":900}
2021-08-10 10:33:26.223 clash_for_flutter[47982:798974] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1677.201/Foundation/Misc.subproj/NSUndoManager.m:363
2021-08-10 10:33:26.224 clash_for_flutter[47982:798974] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff30081b57 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff68efb5bf objc_exception_throw + 48
2 CoreFoundation 0x00007fff300aad08 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff3279cead -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 Foundation 0x00007fff326d95fe +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 440
5 AppKit 0x00007fff2d26665c -[NSApplication run] + 864
6 clash_for_flutter 0x00000000045f9d71 nativeLoop + 81
7 clash_for_flutter 0x00000000045f89e2 _cgo_dab539588ee3_Cfunc_nativeLoop + 34
8 clash_for_flutter 0x0000000004071550 runtime.asmcgocall + 112
)
libc++abi.dylib: terminating with uncaught exception of type NSException
SIGABRT: abort
PC=0x7fff6a1eb33a m=4 sigcode=0

goroutine 0 [idle]:
runtime: unknown pc 0x7fff6a1eb33a
stack: frame={sp:0x7000073dc548, fp:0x0} stack=[0x70000735e340,0x7000073ddf40)
00007000073dc448: 0000000000000080 0000000000000080
runtime: unknown pc 0x7fff6a1eb33a
stack: frame={sp:0x7000073dc548, fp:0x0} stack=[0x70000735e340,0x7000073ddf40)
00007000073dc448: 0000000000000080 0000000000000080

goroutine 35 [syscall]:
runtime.cgocall(0x45f89c0, 0xc0001367b0, 0x0)
/usr/local/Cellar/go/1.16.3/libexec/src/runtime/cgocall.go:154 +0x5b fp=0xc000136780 sp=0xc000136748 pc=0x4008e1b
github.com/getlantern/systray._Cfunc_nativeLoop(0x0)
_cgo_gotypes.go:119 +0x45 fp=0xc0001367b0 sp=0xc000136780 pc=0x45c8fc5
github.com/getlantern/systray.nativeLoop(...)
/Users/zhuima/go/pkg/mod/github.com/getlantern/[email protected]/systray_nonwindows.go:23
github.com/getlantern/systray.Run(0x0, 0x0)
/Users/zhuima/go/pkg/mod/github.com/getlantern/[email protected]/systray.go:78 +0x3a fp=0xc0001367d0 sp=0xc0001367b0 pc=0x45c7f5a
runtime.goexit()
/usr/local/Cellar/go/1.16.3/libexec/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc0001367d8 sp=0xc0001367d0 pc=0x40718c1
created by github.com/mapleafgo/go-flutter-systray/go.(*GoFlutterSystrayPlugin).InitPlugin
/Users/zhuima/go/pkg/mod/github.com/mapleafgo/go-flutter-systray/[email protected]/plugin.go:61 +0x6a

部分 Android 设备上会导致断网

在 Meizu20,Flyme10.5.0.0.A,Android14 设备上可以较为稳定复现:

手机安装 QQ/企业微信 的情况下,开启软件,连接 vpn,稍等一会儿

表现为类似如下日志高速刷屏,活跃链接数上升到几千甚至上万,内存占用超高,设备无法正常联网(即使是国内网站)

[2024/02/15 16:51:57] [INFO] [TCP] 10.0.0.153:46204 --> 121.229.94.168:443 match GeoIP(CN) using DIRECT

init error after start

OS: manjaro kde
output:

go-flutter: calculated pixelRatio limited to a minimum of 1.0. metrics: {"dpi":141.7674418604651,"monitorWidthMm":344,"monitorWidthSc":1920,"mscpi":141.7674418604651,"pixelRatio":0.8860465116279069,"ppsc":1,"windowWidthPx":904,"windowWidthSc":904}

(clash_for_flutter:95393): Gtk-WARNING **: 13:30:29.913: Theme parsing error: gtk.css:73:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
go-flutter: no method handler registered for method 'routeInformationUpdated' on channel 'flutter/navigation'
go-flutter: no method handler registered for method 'routeInformationUpdated' on channel 'flutter/navigation'

screen output: 显示"初始化失败"
other:
sometimes after restart it can start sucsessfully, but still display go-flutter: no method handler registered for method 'routeInformationUpdated' on channel 'flutter/navigation' error

小白,windows编译不通过

环境配置如下:
image

[√] Flutter (Channel stable, 3.19.3, on Microsoft Windows [版本 10.0.22631.3235], locale zh-CN)
• Flutter version 3.19.3 on channel stable at D:\dev\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ba39319843 (4 days ago), 2024-03-07 15:22:21 -0600
• Engine revision 2e4ba9c6fb
• Dart version 3.3.1
• DevTools version 2.31.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at D:\dev\Android\Sdk
• Platform android-33, build-tools 33.0.0
• Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)

编译报错:
/C:/Users/jc/AppData/Local/Pub/Cache/hosted/pub.dev/asuka-2.2.0/lib/src/asuka_singleton_deprecated.dart(104,10): error G0A383C70: Expected 0 type arguments. [E:\my_test\clash-for-flutter\build\windows\x64\flutter\flutter_assemble.vcxproj]
/C:/Users/jc/AppData/Local/Pub/Cache/hosted/pub.dev/asuka-2.2.0/lib/src/asuka_singleton.dart(186,12): error G0A383C70: Expected 0 type arguments. [E:\my_test\clash-for-flutter\build\windows\x64\flutter\flutter_assemble.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'E:\my_test\clash-for-flutter\build\windows\x64\CMakeFiles\f3c93ee1011ccbeab3bc097aee595140\flutter_windows.dll.rule;E:\my_test\clash-for-flutter\build\windows\x64\CMakeFiles\7044b983997cd483576a57c06b281348\flutter_assemble.rule;E:\my_test\clash-for-flutter\windows\flutter\CMakeLists.txt' exited with code 1. [E:\my_test\clash-for-flutter\build\windows\x64\flutter\flutter_assemble.vcxproj]

ubuntu上运行报错

Launching lib/main.dart on Linux in debug mode...
Building Linux application...
Unable to start executable "build/linux/x64/debug/bundle/clash_for_flutter": ProcessException: Failed to find "build/linux/x64/debug/bundle/clash_for_flutter" in the search path.
Command: build/linux/x64/debug/bundle/clash_for_flutter
ProcessException: Failed to find "build/linux/x64/debug/bundle/clash_for_flutter" in the search path.
Command: build/linux/x64/debug/bundle/clash_for_flutter

ArchLinux运行报错

./clash_for_flutter-1.0.2-linux.AppImage

/tmp/.mount_clash_WnSniX/clash_for_flutter: error while loading shared libraries: libayatana-appindicator3.so.1: cannot open shared object file: No such file or directory

安装了libayatana-appindicator之后就可以正常运行了。一般来讲AppImage应该自带所有依赖的?

Hover 编译失败

使用项目原来的依赖会有这个问题:

/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/widgets/widget_module.dart:38:8
: Error: Type 'SingletonBind' not found.
  List<SingletonBind> get instanciatedSingletons =>
       ^^^^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/widgets/widget_module.dart:43:1
2: Error: Type 'SingletonBind' not found.
      List<SingletonBind<Object>> singletons, Injector injector) {
           ^^^^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/models/bind.dart:4:7: Error:
The non-abstract class 'Bind' is missing implementations for these members:
 - BindContract.cast
 - BindContract.copyWith
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class Bind<T extends Object> extends BindContract<T> {
      ^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart:53:19: Context:
'BindContract.cast' is defined here.
  BindContract<E> cast<E extends Object>();
                  ^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart:42:19: Context:
'BindContract.copyWith' is defined here.
  BindContract<T> copyWith({
                  ^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/models/bind.dart:46:7: Error:
The non-abstract class 'AsyncBind' is missing implementations for these members:
 - BindContract.cast
 - BindContract.copyWith
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class AsyncBind<T extends Object> extends Bind<Future<T>>
      ^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart:53:19: Context:
'BindContract.cast' is defined here.
  BindContract<E> cast<E extends Object>();
                  ^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart:42:19: Context:
'BindContract.copyWith' is defined here.
  BindContract<T> copyWith({
                  ^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/models/bind.dart:68:7: Error:
The non-abstract class 'BindInject' is missing implementations for these members:
 - BindContract.cast
 - BindContract.copyWith
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class BindInject<T extends Object> extends Bind<T> {
      ^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart:53:19: Context:
'BindContract.cast' is defined here.
  BindContract<E> cast<E extends Object>();
                  ^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart:42:19: Context:
'BindContract.copyWith' is defined here.
  BindContract<T> copyWith({
                  ^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_core-2.0.0/lib/src/di/injector.dart:8:7: Error: The non-abstract
class 'InjectorImpl' is missing implementations for these members:
 - Injector.getBind
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class InjectorImpl<T> extends Injector<T> {
      ^^^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/injector.dart:11:16: Context:
'Injector.getBind' is defined here.
  BindEntry<B> getBind<B extends Object>();
               ^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/widgets/widget_module.dart:25:6
: Error: The return type of the method 'WidgetModule.getBind' is 'T?', which does not match the return type,
'BindEntry<T>?', of the overridden method, 'BindContextImpl.getBind'.
 - 'BindEntry' is from 'package:modular_interfaces/src/di/bind.dart'
 ('/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart').
Change to a subtype of 'BindEntry<T>?'.
  T? getBind<T extends Object>(Injector injector) {
     ^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_core-2.0.0/lib/src/di/bind_context.dart:48:17: Context: This is
the overridden method ('getBind').
  BindEntry<T>? getBind<T extends Object>(Injector injector) {
                ^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_core-2.0.0/lib/src/di/injector.dart:12:16: Error: The return type
of the method 'InjectorImpl.get' is 'BindEntry<B>', which does not match the return type, 'B', of the overridden method,
'Injector.get'.
 - 'BindEntry' is from 'package:modular_interfaces/src/di/bind.dart'
 ('/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart').
Change to a subtype of 'B'.
  BindEntry<B> get<B extends Object>() {
               ^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/injector.dart:8:5: Context: This is
the overridden method ('get').
  B get<B extends Object>();
    ^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_core-2.0.0/lib/src/di/injector.dart:129:8: Error: The method
'InjectorImpl.removeBindContext' has fewer named arguments than those of overridden method 'Injector.removeBindContext'.
  void removeBindContext<B extends BindContext>() {
       ^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/injector.dart:33:8: Context: This is
the overridden method ('removeBindContext').
  void removeBindContext<T extends BindContext>({Type? type});
       ^
lib/app/app_widget.dart:33:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem(key: Constant.systrayWinKey, title: "显示窗口"),
          ^^^^^^^^
lib/app/app_widget.dart:34:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem.separator(),
          ^^^^^^^^
lib/app/app_widget.dart:35:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem(
          ^^^^^^^^
lib/app/app_widget.dart:40:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem.separator(),
          ^^^^^^^^
lib/app/app_widget.dart:41:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem(key: GoFlutterSystray.quitCallMethod, title: "退出"),
          ^^^^^^^^
lib/app/app_widget.dart:29:18: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
      var menu = MenuItem.main(
                 ^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/modular_base.dart:178:7: Error:
The method 'setDisposeResolver' isn't defined for the class 'ModularBase'.
 - 'ModularBase' is from 'package:flutter_modular/src/presenter/modular_base.dart'
 ('/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/modular_base.dart').
Try correcting the name to the name of an existing method, or defining a method named 'setDisposeResolver'.
      setDisposeResolver(disposeBindFunction);
      ^^^^^^^^^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/widgets/modular_app.dart:156:31
: Error: The argument type 'Widget' can't be assigned to the parameter type 'InheritedWidget'.
 - 'Widget' is from 'package:flutter/src/widgets/framework.dart'
 ('/D:/flutter/packages/flutter/lib/src/widgets/framework.dart').
 - 'InheritedWidget' is from 'package:flutter/src/widgets/framework.dart'
 ('/D:/flutter/packages/flutter/lib/src/widgets/framework.dart').
    if (_dirty) notifyClients(widget);
                              ^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/widgets/widget_module.dart:26:2
4: Error: A value of type 'BindEntry<T>?' can't be returned from a function with return type 'T?'.
 - 'BindEntry' is from 'package:modular_interfaces/src/di/bind.dart'
 ('/D:/flutter/.pub-cache/hosted/pub.dartlang.org/modular_interfaces-2.0.2/lib/src/di/bind.dart').
    return _fakeModule.getBind<T>(injector);
                       ^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_modular-4.5.1+1/lib/src/presenter/widgets/widget_module.dart:43:1
2: Error: 'SingletonBind' isn't a type.
      List<SingletonBind<Object>> singletons, Injector injector) {
           ^^^^^^^^^^^^^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/easy_sidemenu-0.2.1/lib/src/SideMenuItem.dart:55:20: Warning: Operand of
null-aware operation '?.' has type 'WidgetsBinding' which excludes null.
 - 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart'
 ('/D:/flutter/packages/flutter/lib/src/widgets/binding.dart').
    WidgetsBinding.instance?.addPostFrameCallback((timeStamp) {
                   ^
Target kernel_snapshot failed: Exception
Failed to build bundle.
hover: Flutter build failed: exit status 1

然后对依赖进行了升级:
flutter pub upgrade --major-versions

Changed 4 constraints in pubspec.yaml:
  flutter_modular: ^4.5.1+1 -> ^5.0.3
  fhir_yaml: ^0.6.1 -> ^0.9.0
  file_picker: ^4.5.1 -> ^5.2.0+1
  easy_sidemenu: ^0.2.1 -> ^0.4.0

接着是这个报错:

lib/app/app_widget.dart:33:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem(key: Constant.systrayWinKey, title: "显示窗口"),
          ^^^^^^^^
lib/app/app_widget.dart:34:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem.separator(),
          ^^^^^^^^
lib/app/app_widget.dart:35:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem(
          ^^^^^^^^
lib/app/app_widget.dart:40:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem.separator(),
          ^^^^^^^^
lib/app/app_widget.dart:41:11: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
          MenuItem(key: GoFlutterSystray.quitCallMethod, title: "退出"),
          ^^^^^^^^
lib/app/app_widget.dart:29:18: Error: 'MenuItem' is imported from both
'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:go_flutter_systray/model/menu_item.dart'.
      var menu = MenuItem.main(
                 ^^^^^^^^
Target kernel_snapshot failed: Exception
Failed to build bundle.
hover: Flutter build failed: exit status 1

app_widget.dart的引用稍作修改 :
import 'package:go_flutter_systray/model/menu_item.dart' as mi;
mi.MenuItem

编译不报错,编译完直接闪退:
hover: App 'clash_for_flutter' exited with error: exit status 0xc0000005

请问是啥原因,是我的版本问题吗?

hover doctor:

hover: Hover version v0.47.2 running on windows
hover: Sharing packaging tools
hover: darwin-bundle is supported
hover: Packaging darwin-dmg is not supported on windows
hover: To still package darwin-dmg on windows you need to run hover with the `--docker` flag.
hover: Packaging darwin-pkg is not supported on windows
hover: To still package darwin-pkg on windows you need to run hover with the `--docker` flag.
hover: Packaging linux-appimage is not supported on windows
hover: To still package linux-appimage on windows you need to run hover with the `--docker` flag.
hover: Packaging linux-deb is not supported on windows
hover: To still package linux-deb on windows you need to run hover with the `--docker` flag.
hover: Packaging linux-pkg is not supported on windows
hover: To still package linux-pkg on windows you need to run hover with the `--docker` flag.
hover: Packaging linux-rpm is not supported on windows
hover: To still package linux-rpm on windows you need to run hover with the `--docker` flag.
hover: Packaging linux-snap is not supported on windows
hover: To still package linux-snap on windows you need to run hover with the `--docker` flag.
hover: To package windows-msi these tools are required: candle
hover: Install the WiX Toolset from https://wixtoolset.org/releases/
hover: To still package windows-msi without the required tools installed you need to run hover with the `--docker` flag.
hover:
hover: Sharing flutter version
Flutter 3.0.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f1875d570e (3 months ago) • 2022-07-13 11:24:16 -0700
Engine • revision e85ea0e79c
Tools • Dart 2.17.6 • DevTools 2.12.2
hover: Flutter engine commit: https://github.com/flutter/engine/commit/e85ea0e79c6d894c120cda4ee8ee10fe6745e187
hover: ⚠ The go-flutter project tries to stay compatible with the beta channel of Flutter.
hover: ⚠     It's advised to use the beta channel: `flutter channel beta`
hover: Finding out the C compiler version
gcc (x86_64-posix-sjlj-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

hover: Sharing the content of go.mod
module plugin_tutorial/go

go 1.19

require (
        github.com/go-flutter-desktop/go-flutter v0.52.2
        github.com/go-flutter-desktop/plugins/go-plugin-example/battery v0.0.0-00010101000000-000000000000
        github.com/go-flutter-desktop/plugins/go-plugin-example/complex v0.0.0-00010101000000-000000000000
        github.com/pkg/errors v0.9.1
)

require (
        github.com/Xuanwo/go-locale v1.1.0 // indirect
        github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect
        github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220712193148-63cf1f4ef61f // indirect
        golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
        golang.org/x/text v0.3.7 // indirect
)

replace github.com/go-flutter-desktop/plugins/go-plugin-example/battery => ../go-plugin-example/battery

replace github.com/go-flutter-desktop/plugins/go-plugin-example/complex => ../go-plugin-example/complex
hover: Sharing the content of hover.yaml
application-name: ""
executable-name: ""
package-name: ""
organization-name: ""
license: ""
target: lib/main_desktop.dart
branch: ""
cache-path: ""
opengl: ""
engine-version: ""
hover: Sharing the content of go/cmd
go\cmd\main.go  go\cmd\options.go

谢谢大佬!

您好这是什么情况哈

--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-000264A902F9401E }
{ platform:macOS, arch:x86_64, id:00006000-000264A902F9401E }
error: /Users/mac/Desktop/zero_mac_windows/macos/Frameworks/libclash.dylib: No such file or directory (in target 'Runner' from project 'Runner')
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Flutter Assemble' from project 'Runner')
** BUILD FAILED **

Building macOS application...
Exception: Build process failed

EndeavourOS 运行 appimage 报错,Ubuntu 正常

EndeavourOS 运行 appimage 报错

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

(clash_for_flutter:4932): Gtk-WARNING **: 11:46:28.760: Could not load a pixbuf from /org/gtk/libgtk/icons/16x16/status/window-minimize-symbolic.symbolic.png.
This may indicate that pixbuf loaders or the mime database could not be found.
**
Gtk:ERROR:../gtk/gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: 无法识别的图像文件格式 (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:../gtk/gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: 无法识别的图像文件格式 (gdk-pixbuf-error-quark, 3)

ubuntu18.04运行 1.2.4核心已转储

应该是运行环境的问题,我在同事电脑上运行成功了,曾经在自己电脑上也能使用,在新装的ubuntu18.04.06上无法打开,已经安装了libfuse2 libfuse-dev docker python cmake ,也尝试安装过go flutter 也失败了

更新订阅后看不到节点

更新之后代理页面还是一片空白,另外有没有兴趣给这个发布到aur里面(系统Arch linux,版本滚的最新版,就酱)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.