-
Notifications
You must be signed in to change notification settings - Fork 342
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
Can't build with 5.0.3: The getter 'Uint8List' isn't defined for the class 'ProtobufConverterImpl'. #649
Comments
I guess I should add context, trying to build for Android from Android Studio, but I also build for iOS, but haven't tried since this issue popped up. |
same problem,my solution is to lock 5.0.2 and clear cache. |
@wsmzdyss How can I lock the package version? I wrote "flutter_reactive_ble: 5.0.2" in pubspec.yaml file. (beroe this issue happen, I have writen "flutter_reactive_ble: ^5.0.2"). And now, this issue still occur. |
@SungchangChoi you need clear cache, I remove project from Android Studio and reopen it. |
flutter_reactive_ble was still throwing errors after I locked it to 5.0.2 in my pubspec.yaml and ran 'Invalidate Cache / Restart...' in Android Studio. I had to open the flutter_reactive_ble files and modify the pubspec.yaml in the plugin because it had references to reactive_ble_mobile and reactive_ble_platform_interface both of which had the ^ on them so it was updating them and throwing errors as well. |
You also need to enter the /flutter/.pub-cache/hosted/xxxx/ folder and delete the cache of version 5.0.3 |
If anyone struggles with the same issue, you need to upgrade flutter to version |
pubspec.lock modify version to 5.0.2 |
I have upgraded to flutter 3.3.3 now i am not having thiss issue |
I am on Flutter 3.3.9, flutter_reactive_ble 5.0.0 and im having this issue.
|
@vontdeux It's because of the way pubspec resolves transitive dependencies. I had the same issue and had to add dependency_override for |
I had a build working with 5.0.2 and then had to modify my pubspec.yaml to add an image asset to the build and it upgraded me to 5.0.3 and now I can't get my project to build. I tried removing 5.0.3 and setting pubspec to not upgrade from 5.0.2 and now there are errors with 5.0.2 that didn't happen before.
5.0.3 errors:
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/reactive_ble_mobile-5.0.3/lib/src/converter/protobuf_converter.dart:49:42: Error: The getter 'Uint8List' isn't defined for the class 'ProtobufConverterImpl'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'Uint8List'.
message.serviceData.map((entry) => Uint8List.fromList(entry.data)),
^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/reactive_ble_mobile-5.0.3/lib/src/converter/protobuf_converter.dart:63:29: Error: The getter 'Uint8List' isn't defined for the class 'ProtobufConverterImpl'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'Uint8List'.
manufacturerData: Uint8List.fromList(message.manufacturerData),
^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/reactive_ble_mobile-5.0.3/lib/src/converter/protobuf_converter.dart:61:24: Error: The argument type 'Map<Uuid, dynamic>' can't be assigned to the parameter type 'Map<Uuid, Uint8List>'.
serviceData: serviceData,
^
I get a similar Uint8List error in 5.0.2 now.
The text was updated successfully, but these errors were encountered: