Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: The getter 'addressOf' isn't defined for the class 'Utf8'

Screenshot of the requirements file

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:63:33: Error: The getter 'addressOf' isn't defined for the class 'Utf8'.

'Utf8' is from 'package:ffi/src/utf8.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'. String toString() => fromUtf8(addressOf); ^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.18.1/lib/src/picture_provider.dart:50:59: Error: No named parameter with the name 'nullOk'. context != null ? Localizations.localeOf(context, nullOk: true) : null, ^^^^^^ /C:/src/flutter/packages/flutter/lib/src/widgets/localizations.dart:413:17: Context: Found this candidate, but the arguments don't match. static Locale localeOf(BuildContext context) { ^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-0.0.4+3/lib/src/path_provider_windows_real.dart:126:25: Error: The getter 'addressOf' isn't defined for the class 'GUID'.

'GUID' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'. knownFolderID.addressOf, KF_FLAG_DEFAULT, NULL, pathPtrPtr); ^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1067:7: Error: The getter 'addressOf' isn't defined for the class 'LOGFONT'.

'LOGFONT' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'. addressOf.cast().elementAt(28).cast(); ^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1112:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.

'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'. LOGFONT get elfLogFont => addressOf.cast().ref; ^^^^^^^^^ /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1114:29: Error: The getter 'addressOf' isn't defined for the class 'ENUMLOGFONTEX'.

'ENUMLOGFONTEX' is from 'package:win32/src/structs.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'. String get elfFullName => addressOf ^^^^^^^^^

FAILURE: Build failed with an exception.

  • Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035

  • What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 6s Exception: Gradle task assembleDebug failed with exit code 1

like image 750
Maychine Avatar asked May 22 '21 16:05

Maychine


3 Answers

I got this error today. Here is what I did,

  1. Deleted .idea folder and build folder as well as pubspec-lock file.
  2. run flutter pub get

After these 2 simple steps, Project compiled without any errors.

like image 151
Dasunx Avatar answered Nov 13 '22 05:11

Dasunx


I find solution. Delete those file from folder

".idea" file

"build" file

"pubspec-lock" file.

After delete "flutter clean" form terminal. Then "pub get".

like image 23
AK IJ Avatar answered Nov 13 '22 05:11

AK IJ


  1. flutter clean
  2. flutter pub get
  3. flutter pub upgrade
like image 16
Bala Subramanian M Avatar answered Nov 13 '22 04:11

Bala Subramanian M