Skip to content

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

@salarshad

Description

@salarshad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions