HistoryOfEverything
HistoryOfEverything copied to clipboard
Won't run on flutter 2.12, trace attached
The app won't get built. Steps to reproduce:
-
git clone https://github.com/2d-inc/HistoryOfEverything
+ default installation steps -
cd HistoryOfEverything/app && flutter run
Error 1:
Running pod install... 39.9s
Warning: Podfile is out of date
This can cause issues if your application depends on plugins that do not support iOS or macOS.
See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for
details.
If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197
for instructions.
To regenerate the Podfile, run:
rm ios/Podfile
Error launching application on iPhone 11 Pro Max.
-
rm ios/Podfile && flutter run
Error 2:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at
https://flutter.dev/go/android-project-migration
to migrate your project.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install... 1,951ms
Running Xcode build...
Xcode build done. 23.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
33:11: warning: variable 'originRect' is used uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
40:26: note: uninitialized use occurs here
atSource:originRect];
^~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
33:7: note: remove the 'if' if its condition is always true
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
33:11: warning: variable 'originRect' is used uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
40:26: note: uninitialized use occurs here
atSource:originRect];
^~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
33:11: note: remove the '&&' if its condition is always true
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
33:11: warning: variable 'originRect' is used uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
40:26: note: uninitialized use occurs here
atSource:originRect];
^~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
33:11: note: remove the '&&' if its condition is always true
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
33:11: warning: variable 'originRect' is used uninitialized whenever '&&' condition is false
[-Wsometimes-uninitialized]
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
40:26: note: uninitialized use occurs here
atSource:originRect];
^~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
33:11: note: remove the '&&' if its condition is always true
if (originX != nil && originY != nil && originWidth != nil && originHeight != nil) {
^~~~~~~~~~~~~~~~~
/Users/dev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/share-0.5.3/ios/Classes/SharePlugin.m:
32:7: note: variable 'originRect' is declared here
CGRect originRect;
^
4 warnings generated.
lib/bloc_provider.dart:51:18: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class
'BuildContext'.
- 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'
('../../../../flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named
'inheritFromWidgetOfExactType'.
(context.inheritFromWidgetOfExactType(BlocProvider) as BlocProvider);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/bloc_provider.dart:60:18: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class
'BuildContext'.
- 'BuildContext' is from 'package:flutter/src/widgets/framework.dart'
('../../../../flutter/packages/flutter/lib/src/widgets/framework.dart').
Try correcting the name to the name of an existing method, or defining a method named
'inheritFromWidgetOfExactType'.
(context.inheritFromWidgetOfExactType(BlocProvider) as BlocProvider);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.2.0/lib/src/builder.dart:326:49:
Error: The getter 'children' isn't defined for the class 'InlineSpan'.
- 'InlineSpan' is from 'package:flutter/src/painting/inline_span.dart'
('../../../../flutter/packages/flutter/lib/src/painting/inline_span.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'children'.
List<TextSpan> children = previous.text.children != null
^^^^^^^^
../../../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_markdown-0.2.0/lib/src/builder.dart:327:41:
Error: The getter 'children' isn't defined for the class 'InlineSpan'.
- 'InlineSpan' is from 'package:flutter/src/painting/inline_span.dart'
('../../../../flutter/packages/flutter/lib/src/painting/inline_span.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'children'.
? new List.from(previous.text.children)
^^^^^^^^
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
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 14.4.99. (in target 'share' from project 'Pods')
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 14.4.99. (in target 'Runner' from project 'Runner')
warning: None of the architectures in ARCHS (x86_64) are valid. Consider setting ARCHS to
$(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, arm64e, armv7,
armv7s). (in target 'Runner' from project 'Runner')
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 14.4.99. (in target 'url_launcher' from project 'Pods')
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 14.4.99. (in target 'shared_preferences' from project
'Pods')
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 14.4.99. (in target 'Pods-Runner' from project 'Pods')
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 14.4.99. (in target 'Flutter' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
I had the same problem. I fixed it by replacing old flutter_markdown: ^0.2.0 by new flutter_markdown: ^0.6.1 in the pubspec.yaml file.
Then in ./lib/article/article_widget.dart file replace old blockquotePadding: 20.0 by new blockquotePadding: EdgeInsets.all (20.0) (line 92)
To avoid multile warning: The iOS Simulator..., replace all IPHONEOS_DEPLOYMENT_TARGET = 8.0;
by IPHONEOS_DEPLOYMENT_TARGET = 9.0;
in the file ./ios/Runner.xcodeproj/project.pbxproj
Also make sure these lines of code are in the ./ios/Podfile file
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
I build success on Macbook M1.
@vbastianpc please help to run the project