Share Preference package of flutter show error after update

2,123

If you're using the Flutter master channel, switch to dev or beta. This is a known issue.

Share:
2,123
Munawar Hussian
Author by

Munawar Hussian

Expert PHP, SQL, Javascript and HTML&CSS Work as a Web Application developer for last 7 year, worked with different organization private, government and as Freelancer

Updated on December 27, 2022

Comments

  • Munawar Hussian
    Munawar Hussian over 1 year

    I am using Share Preference package for my flutter application but it show follwoing errors

    Plugin path_provider_linux doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.

    To set a default implementation, use: flutter: plugin: platforms: linux: default_package:

    To implement an interface, use: flutter: plugin: implements:

    Plugin path_provider_windows doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.

    To set a default implementation, use: flutter: plugin: platforms: windows: default_package:

    To implement an interface, use: flutter: plugin: implements:

    Plugin shared_preferences_linux doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.

    To set a default implementation, use: flutter: plugin: platforms: linux: default_package:

    To implement an interface, use: flutter: plugin: implements:

    Plugin shared_preferences_macos doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.

    To set a default implementation, use: flutter: plugin: platforms: macos: default_package:

    To implement an interface, use: flutter: plugin: implements:

    Plugin shared_preferences_windows doesn't implement a plugin interface, nor sets a default implementation in pubspec.yaml.

    To set a default implementation, use: flutter: plugin: platforms: windows: default_package:

    To implement an interface, use: flutter: plugin: implements:

    /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1111:7: Error: Struct 'ENUMLOGFONTEX' is empty. Empty structs are undefined behavior. class ENUMLOGFONTEX extends Struct { ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2835:7: Error: Struct 'BLUETOOTH_PIN_INFO' is empty. Empty structs are undefined behavior. class BLUETOOTH_PIN_INFO extends Struct { ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2960:7: Error: Struct 'EXCEPINFO' is empty. Empty structs are undefined behavior. class EXCEPINFO extends Struct {} ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2966:7: Error: Struct 'PROPERTYKEY' is empty. Empty structs are undefined behavior. class PROPERTYKEY extends Struct {} ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2973:7: Error: Struct 'PROPVARIANT' is empty. Empty structs are undefined behavior. class PROPVARIANT extends Struct {} ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2978:7: Error: Struct 'SAFEARRAY' is empty. Empty structs are undefined behavior. class SAFEARRAY extends Struct {} ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2985:7: Error: Struct 'CLSID' is empty. Empty structs are undefined behavior. class CLSID extends Struct {} ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7: Error: Struct 'STATSTG' is empty. Empty structs are undefined behavior. class STATSTG extends Struct {} ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2999:7: Error: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Empty structs are undefined behavior. class NLM_SIMULATED_PROFILE_INFO extends Struct {} ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct 'Utf8' is empty. Empty structs are undefined behavior. class Utf8 extends Struct { ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error: Struct 'Utf16' is empty. Empty structs are undefined behavior. class Utf16 extends Struct { ^ /D:/Software/android/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error: Expected type 'T' to be a valid and instantiated subtype of 'NativeType'. final int totalSize = count * sizeOf(); ^

    FAILURE: Build failed with an exception.

    • Where: Script 'D:\Software\android\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991

    • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.

    Process 'command 'D:\Software\android\flutter\bin\flutter.bat'' finished with non-zero exit value 1