flutter-clean-architecture icon indicating copy to clipboard operation
flutter-clean-architecture copied to clipboard

build error

Open cyeh1234 opened this issue 3 years ago • 1 comments

Xcode's output: ↳ ../../development/flutter2.5.3/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' ('../../development/flutter2.5.3/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); ^^^^^^^^^ ../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error: Struct 'Utf16' is empty. Empty structs and unions are undefined behavior. class Utf16 extends Struct { ^ ../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct 'Utf8' is empty. Empty structs and unions are undefined behavior. class Utf8 extends Struct { ^ ../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:14:7: Error: Struct 'sqlite3_context' is empty. Empty structs and unions are undefined behavior. class sqlite3_context extends Struct {} ^ ../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:12:7: Error: Struct 'sqlite3_value' is empty. Empty structs and unions are undefined behavior. class sqlite3_value extends Struct {} ^ ../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:10:7: Error: Struct 'sqlite3_stmt' is empty. Empty structs and unions are undefined behavior. class sqlite3_stmt extends Struct {} ^ ../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:8:7: Error: Struct 'sqlite3' is empty. Empty structs and unions are undefined behavior. class sqlite3 extends Struct {} ^ ../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:6:7: Error: Struct 'char' is empty. Empty structs and unions are undefined behavior. class char extends Struct {} ^ ../../development/flutter2.5.3/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<T>(); ^ Failed to package /Users/charlesyeh15/Downloads/flutter_clean_architecture-part3_local_data. Command PhaseScriptExecution failed with a nonzero exit code note: Using new build system note: Planning note: Build preparation complete note: Building targets in dependency order /Users/charlesyeh15/Downloads/flutter_clean_architecture-part3_local_data/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'FMDB' from project 'Pods')

Could not build the application for the simulator. Error launching application on iPhone 8.

cyeh1234 avatar Jan 25 '22 11:01 cyeh1234

Open your pubspec.yaml file and replace the floor and floor_generator dependencies versions to:

dependencies:
floor: ^1.0.0
dev_dependencies:
 floor_generator: ^1.0.0

And then run futter clean && flutter pub get

That way it should build fine

jkano avatar Feb 24 '22 23:02 jkano

Hello @cyeh1234 @jkano, the project and the articles have been updated to the latest changes.

devmuaz avatar Feb 26 '23 01:02 devmuaz