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

Build failure on Windows. Any thoughts on how to resolve? #44

Closed
g40 opened this issue Jun 4, 2024 · 3 comments
Closed

Build failure on Windows. Any thoughts on how to resolve? #44

g40 opened this issue Jun 4, 2024 · 3 comments

Comments

@g40
Copy link

g40 commented Jun 4, 2024

Thanks for the code. Great to have some real application examples.

With a fresh clone onto a Windows 10x64 22H2 machine I get the error shown below. Flutter/Dart are, I believe, the most recent releases.

Not sure if the referenced packages should be updated or not. Any advice appreciated.

R:\src\flutter\brisk>flutter --version
Flutter 3.22.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision a14f74ff3a (13 days ago) • 2024-05-22 11:08:21 -0500
Engine • revision 55eae6864b
Tools • Dart 3.4.1 • DevTools 2.34.3

Build spew:

R:\src\flutter\brisk>flutter run
Resolving dependencies...
Downloading packages...
  _fe_analyzer_shared 67.0.0 (70.0.0 available)
  analyzer 6.4.1 (6.5.2 available)
  csv 5.1.1 (6.0.0 available)
  file_picker 6.2.1 (8.0.3 available)
  flutter_local_notifications 16.3.3 (17.1.2 available)
  hotkey_manager 0.1.8 (0.2.3 available)
  http 1.2.0 (1.2.1 available)
  intl 0.18.1 (0.19.0 available)
  launch_at_startup 0.2.2 (0.3.0 available)
  leak_tracker 10.0.4 (10.0.5 available)
  leak_tracker_flutter_testing 3.0.3 (3.0.5 available)
  material_color_utilities 0.8.0 (0.11.1 available)
  meta 1.12.0 (1.15.0 available)
  package_info_plus 5.0.1 (8.0.0 available)
  package_info_plus_platform_interface 2.0.1 (3.0.0 available)
  pluto_grid 7.0.2 (8.0.0 available)
  test_api 0.7.0 (0.7.2 available)
  url_launcher_web 2.2.3 (2.3.1 available)
  uuid 3.0.7 (4.4.0 available)
  vm_service 14.2.1 (14.2.3 available)
  web 0.4.2 (0.5.1 available)
  web_socket_channel 2.4.3 (3.0.0 available)
Got dependencies!
22 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib\main.dart on Windows in debug mode...
/C:/Users/moi/AppData/Local/Pub/Cache/hosted/pub.dev/pluto_grid-7.0.2/lib/src/manager/shortcut/pluto_grid_shortcut.dart(33,39): error GC2F972A8: The argument type 'RawKeyEvent' can't be assigned to the parameter type 'KeyEvent'. [R:\src\flutter\brisk\build\windows\x64\flutter\flutter_assemble.vcxproj]
/C:/Users/moi/AppData/Local/Pub/Cache/hosted/pub.dev/pluto_grid-7.0.2/lib/src/manager/shortcut/pluto_grid_shortcut.dart(33,46): error GC2F972A8: The argument type 'RawKeyboard' can't be assigned to the parameter type 'HardwareKeyboard'. [R:\src\flutter\brisk\build\windows\x64\flutter\flutter_assemble.vcxproj]
r:\vs2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'R:\src\flutter\brisk\build\windows\x64\CMakeFiles\a82e6a928630805541b481720c052ab0\flutter_windows.dll.rule;R:\src\flutter\brisk\build\windows\x64\CMakeFiles\37bba2b750860eb356cc77762b01f89c\flutter_assemble.rule;R:\src\flutter\brisk\windows\flutter\CMakeLists.txt' exited with code 1. [R:\src\flutter\brisk\build\windows\x64\flutter\flutter_assemble.vcxproj]
Building Windows application...                                    20.1s
Error: Build process failed.

@AminBhst
Copy link
Owner

AminBhst commented Jun 4, 2024

Hey. Thanks for your interest in the project. I'd recommend using flutter version 3.16.9 as it's the version I use for development and also for building the app. Also make sure to run a flutter clean and try again. In most cases this resolves build related issues.
No package updates are needed either. I will update the packages for future releases but this works fine for now.

@g40
Copy link
Author

g40 commented Jun 4, 2024

Hello there and thanks again. Rewinding to 3.16.9 got me a build that runs. For anyone else here's how.

As I'd no previous versions installed, a flutter downgrade would always fail.

R:\src\flutter\brisk>flutter downgrade 3.16.9
There is no previously recorded version for channel "stable".

So, In the root of the flutter installation directory:

R:\apps\flutter>git checkout 3.16.9
Updating files: 100% (3261/3261), done.
Note: switching to '3.16.9'.

then, to clean and build:

R:\src\flutter\brisk>flutter clean
Downloading package sky_engine...                                  898ms
Downloading flutter_patched_sdk tools...                         1,066ms
Downloading flutter_patched_sdk_product tools...                 1,097ms
Downloading windows-x64 tools...                                    6.1s
Downloading windows-x64/font-subset tools...                       870ms
Deleting build...                                                   28ms
Deleting .dart_tool...                                               8ms
Deleting ephemeral...                                                1ms
Deleting ephemeral...                                                0ms
Deleting ephemeral...                                               28ms
Deleting .flutter-plugins-dependencies...                            0ms
Deleting .flutter-plugins...                                         0ms

R:\src\flutter\brisk>flutter run
Downloading Web SDK...                                              8.0s
Downloading windows-x64-debug/windows-x64-flutter tools...         10.5s
Downloading windows-x64/flutter-cpp-client-wrapper tools...        282ms
Downloading windows-x64-profile/windows-x64-flutter tools...        10.5s
Downloading windows-x64-release/windows-x64-flutter tools...         9.3s
Resolving dependencies...
  _fe_analyzer_shared 64.0.0 (70.0.0 available)
  analyzer 6.2.0 (6.5.2 available)
  archive 3.4.10 (3.6.1 available)
  args 2.4.2 (2.5.0 available)
  back_button_interceptor 7.0.1 (7.0.3 available)
  build_daemon 4.0.1 (4.0.2 available)
  build_runner 2.4.8 (2.4.10 available)
  built_value 8.9.0 (8.9.2 available)
  csv 5.1.1 (6.0.0 available)
  cupertino_icons 1.0.6 (1.0.8 available)
  dart_style 2.3.4 (2.3.6 available)
  ffi 2.1.0 (2.1.2 available)
  file_picker 6.1.1 (8.0.3 available)
  flutter_local_notifications 16.3.2 (17.1.2 available)
  flutter_local_notifications_platform_interface 7.0.0+1 (7.1.0 available)
  flutter_plugin_android_lifecycle 2.0.17 (2.0.20 available)
  flutter_spinkit 5.2.0 (5.2.1 available)
  flutter_svg 2.0.9 (2.0.10+1 available)
  frontend_server_client 3.2.0 (4.0.0 available)
  hotkey_manager 0.1.8 (0.2.3 available)
  http 1.2.0 (1.2.1 available)
  image 4.1.6 (4.2.0 available)
  intl 0.18.1 (0.19.0 available)
  js 0.7.0 (0.7.1 available)
  json_annotation 4.8.1 (4.9.0 available)
  launch_at_startup 0.2.2 (0.3.0 available)
< matcher 0.12.16 (was 0.12.16+1) (0.12.16+1 available)
< material_color_utilities 0.5.0 (was 0.8.0) (0.11.1 available)
< meta 1.10.0 (was 1.12.0) (1.15.0 available)
  package_info_plus 5.0.1 (8.0.0 available)
  package_info_plus_platform_interface 2.0.1 (3.0.0 available)
< path 1.8.3 (was 1.9.0) (1.9.0 available)
  path_provider 2.1.2 (2.1.3 available)
  path_provider_android 2.2.2 (2.2.5 available)
  path_provider_foundation 2.3.2 (2.4.0 available)
  pluto_grid 7.0.2 (8.0.0 available)
  pointycastle 3.7.4 (3.9.1 available)
  provider 6.1.1 (6.1.2 available)
  pubspec_parse 1.2.3 (1.3.0 available)
  shelf_web_socket 1.0.4 (2.0.0 available)
< test_api 0.6.1 (was 0.7.0) (0.7.2 available)
  timezone 0.9.2 (0.9.3 available)
  tray_manager 0.2.1 (0.2.3 available)
  url_launcher 6.2.4 (6.3.0 available)
  url_launcher_android 6.2.2 (6.3.3 available)
  url_launcher_ios 6.2.4 (6.3.0 available)
  url_launcher_macos 3.1.0 (3.2.0 available)
  url_launcher_platform_interface 2.3.1 (2.3.2 available)
  url_launcher_web 2.2.3 (2.3.1 available)
  uuid 3.0.7 (4.4.0 available)
  vector_graphics 1.1.9+2 (1.1.11+1 available)
  vector_graphics_codec 1.1.9+2 (1.1.11+1 available)
  vector_graphics_compiler 1.1.9+2 (1.1.11+1 available)
  web 0.3.0 (0.5.1 available)
  web_socket_channel 2.4.0 (3.0.0 available)
  win32 5.2.0 (5.5.1 available)
  win32_registry 1.1.2 (1.1.3 available)
  window_manager 0.3.8 (0.3.9 available)
  windows_notification 1.0.0 (1.2.0 available)
These packages are no longer being depended on:
- leak_tracker 10.0.4
- leak_tracker_flutter_testing 3.0.3
- leak_tracker_testing 3.0.1
- vm_service 14.2.1
Changed 9 dependencies!
59 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib\main.dart on Windows in debug mode...
Building Windows application...                                    69.2s
✓  Built build\windows\x64\runner\Debug\brisk.exe.
Syncing files to device Windows...                                 200ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Windows is available at: http://127.0.0.1:53939/OPphsuq6xeY=/

@AminBhst AminBhst closed this as completed Jun 4, 2024
@AminBhst
Copy link
Owner

AminBhst commented Jun 4, 2024

Great. Let me know if you faced any other issues

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

2 participants