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

fix: Build failing after Flutter upgrade and pub update (Windows) #33

Open
salarshad opened this issue Jan 21, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@salarshad
Copy link

Description

Getting the following errors when building the application, even if just the import statement is included:

../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/extension/bluetooth_characteristic_extension.dart(4,3): error G5FE39F1E: Type 'BmBluetoothCharacteristic' not found. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/extension/bluetooth_descriptor_extension.dart(4,3): error G5FE39F1E: Type 'BmBluetoothDescriptor' not found. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/extension/bluetooth_service_extension.dart(4,3): error G5FE39F1E: Type 'BmBluetoothService' not found. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/extension/characteristic_properties_extension.dart(4,3): error G5FE39F1E: Type 'BmCharacteristicProperties' not found. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/windows/bluetooth_characteristic_windows.dart(26,17): error G311314CC: Method not found: 'BmBluetoothDescriptor'. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/windows/bluetooth_characteristic_windows.dart(34,25): error G311314CC: Method not found: 'BmCharacteristicProperties'. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/windows/bluetooth_characteristic_windows.dart(20,11): error G311314CC: Method not found: 'BmBluetoothCharacteristic'. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/windows/bluetooth_service_windows.dart(17,11): error G311314CC: Method not found: 'BmBluetoothService'. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/extension/bluetooth_characteristic_extension.dart(5,12): error GE5CFE876: The method 'BmBluetoothCharacteristic' isn't defined for the class 'BluetoothCharacteristic'. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/extension/bluetooth_descriptor_extension.dart(5,12): error GE5CFE876: The method 'BmBluetoothDescriptor' isn't defined for the class 'BluetoothDescriptor'. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/extension/bluetooth_service_extension.dart(5,12): error GE5CFE876: The method 'BmBluetoothService' isn't defined for the class 'BluetoothService'. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] ../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_blue_plus_windows-1.25.2/lib/src/extension/characteristic_properties_extension.dart(5,12): error GE5CFE876: The method 'BmCharacteristicProperties' isn't defined for the class 'CharacteristicProperties'. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\Users\user\app\build\windows\x64\CMakeFiles\1c8b3faccf85d52aa2a1847cda52179f\flutter_windows.dll.rule;C:\Users\user\app\build\windows\x64\CMakeFiles\6c2ad6781212b23a58ac116e4993df90\flutter_assemble.rule' exited with code 1. [C:\Users\user\app\build\windows\x64\flutter\flutter_assemble.vcxproj] Error: Build process failed.

Steps To Reproduce

  1. Upgrade Flutter to latest version and Pub upgrade
  2. Include flutter_blue_plus_windows to pubspec.yaml
  3. Import flutter_blue_plus_windows to a dart file
  4. Build on Windows

Expected Behavior

Should build without errors

Additional Context

Flutter_blue_plus alone works fine. The error occurs only in flutter_blue_plus_windows. I have tried using it in a new blank project as well.

@salarshad salarshad added the bug Something isn't working label Jan 21, 2025
@salarshad
Copy link
Author

I have downgraded Flutter to version 3.27.1, and even specified older flutter_blue_plus_windows version upto 1.23.6.

But still getting the same build error.

I have tried "flutter clean" in the project, cleaning Pub cache, cleaning MS Visual Studio cache, also tried using the package in a new blank project. Tried in both VS Code and Android Studio. Also restarted the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant