Error Module 'flutter_secure_storage' not found when try Product ->Build for -> Profiling - swift

well this error occurs to me when I try to make my app in production.
The app is created with flutter and I was able to create the apk for android, but when I try to do it for ios it won't let me.
The file that I am opening is Runner.xcworkspace and the problem is the import of a flutter library, it seems to me that I have to make some kind of connection with the pods.
here is the error, I want to tell you that I do not want to run the app, but to make an installer
The error that occurs when building a release (ie. flutter build ipa) and not when running a debug build is:
/[REDACTED]/ios/Runner/GeneratedPluginRegistrant.m:48:9: fatal error: module
'flutter_secure_storage' not found
#import flutter_secure_storage;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system

For me regenerating Podfile in the following way solved the issue:
rm ios/Podfile && flutter build ios
See Closed [ios][release] GeneratedPluginRegistrant.m Module not found
#43986

Related

Error: 'Flutter/Flutter.h' file not found

I added firebase_crashlytics to my Flutter project and followed the Firebase guideline in order to install it.
On flutter run the app works well without any error.
ONLY DURING flutter build ipa I get this:
Error (Xcode): 'Flutter/Flutter.h' file not found
/project/ios/Runner/GeneratedPluginRegistrant.h:9:8
Error (Xcode): failed to emit precompiled header
'/Users/macnew/Library/Developer/Xcode/DerivedData/Runner-biyumwxiyqxyjkacscuqcbwbjroj/Build/Intermediates.no
index/ArchiveIntermediates/Runner/PrecompiledHeaders/Runner-Bridging-Header-swift_26UGEQJVHLD5H-clang_19ZWN9O
PIOOJI.pch' for bridging header '/project/ios/Runner/Runner-Bridging-Header.h'
Encountered error while archiving for device.
Any advice about this?
I'm using firebase_crashlytics 2.8.6 (latest version) and flutter 2.10.5 (without null-safety).
Since I tried every solution given on StackOverflow and Github (Flutter repo), here you have the solution:
Delete the "ios" folder
Run the app and create the iOS project
Inside the "ios" folder ("cd ios"), run the command "pod install"
Follow the official guide by the iOS side
This is the only solution that works.

Can't run flutter project due to error VERBOSE.dart error, isolate error

When I try to run my flutter-project code on the iOS simulator in VS code, I get the following error on the console:
Launching lib/main.dart on iPhone 11 Pro in debug mode...
lib/main.dart:1
Xcode build done. 24.4s
[VERBOSE-2:shell.cc(103)] Dart Error: Can't load Kernel binary: Invalid SDK hash.
[VERBOSE-2:dart_isolate.cc(171)] Could not prepare isolate.
[VERBOSE-2:runtime_controller.cc(415)] Could not create root isolate.
[VERBOSE-2:shell.cc(588)] Could not launch engine with configuration.
Thanks in advance.
Hi!
In my case, the error was caused by the forced shutdown of the IDE.
After manually selecting the libraries, I identified the one that was causing the problem, updated the project without it, and updated the project again with it.
With that the problem was solved.
Hope I have helped, if yes, please flag.
Could you delete the bin/cache folder, then run app
Open terminal and run: $ flutter channel beta
"it will install beta version, once installation is done, try it!"
"In case you willing to change the beta version to stable version you can use the following:"
$ flutter channel stable

Tried archiving flutter project with no disc space left, can't fix errors

Question upfront: How can I thoroughly clean/repair my flutter project to allow it to run/build again?
I had been building and archiving (in Xcode) flutter projects without issue until just now.
My computer ran out of disc space mid archive and forced it to stop with "nonzero exit code".
I deleted a bunch of things on the computer to make space, and now it says there is >100gb left.
I was due for a flutter upgrade, so I ran flutter upgrade, which completed without error.
I closed android studio and Xcode and restarted my computer.
I ran flutter clean as well as clean within Xcode.
I can no longer run the app within flutter or run/archive within Xcode.
The exact errors seem variable, but here are some of them that I see:
Running from Xcode:
.../ios/Flutter/Flutter.framework/Headers/FlutterPlugin.h:292:13: Cannot find protocol declaration for 'FlutterTextureRegistry'; did you mean 'FlutterPluginRegistry'?
.../ios/Flutter/Flutter.framework/Headers/FlutterEngine.h:54:38: Cannot find protocol declaration for 'FlutterTextureRegistry'; did you mean 'FlutterPluginRegistry'?
.../.pub-cache/hosted/pub.dartlang.org/in_app_purchase-0.3.1+2/ios/Classes/FIAPReceiptManager.m:13:9: Could not build module 'Flutter'
Running from Flutter (I can't paste all of the errors... way too long):
^~~~~~~~~~~~~~~~~~~~~~
FlutterPluginRegistry
While building module 'Flutter' imported from .../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.h:5:
In file included from :1:
In file included from .../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/Flutter.h:54:
In file included from .../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/FlutterAppDelegate.h:11:
.../Documents/Flutter/patient_medical_record/ios/Pods/../Flutter/Flutter.framework/Headers/FlutterPlugin.h:395:11: note: 'FlutterPluginRegistry' declared here
#protocol FlutterPluginRegistry
^
3 errors generated.
In file included from .../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.m:5:
.../.pub-cache/hosted/pub.dartlang.org/path_provider-1.6.5/ios/Classes/FLTPathProviderPlugin.h:5:9: fatal error: could not build module 'Flutter'
#import
~~~~~~~^
4 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Well this is a bummer because I can't find a clean solution, but for now I did fix it with the following:
Create a new flutter project
Copied over the lib files
Copied over other setup in random places (i.e. google services, android changes)
Copied over pubspec.yaml and ran packages get
It now works again. Clearly something went wrong in the Flutter-managed files that I don't understand. If someone else can think of a better solution to effectively reset the project, please share.

Unable to create flutter project

When running flutter create followed by project name, I receive this error:
Error: Error when reading '../documents/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No such file or directory
Running "flutter pub get" in pics...
pub get failed (254; Error: Error when reading
'../documents/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No
such file or directory)
I'm trying to create a new flutter project in xcode. How would I fix this?
'../documents/flutter/bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot': No
such file or directory
It seems like there may be files missing from your Flutter SDK. There should be a file in the Flutter SDK at bin/cache/dart-sdk/bin/snapshots/pub.dart.snapshot but this error suggests it's missing.
The easiest fix may be to delete the bin/cache folder which will cause Flutter to re-download the Dart SDK and other components when you next run flutter. This may take a little while depending on your connection, but is the simplest way to ensure the cache folder is complete. I would suggest closing all IDEs/editors when doing this.
I have same issue but the problem was windows defender at real time detection so the solution was to switch off it then create a project...

android installation error: duplicated package

I am trying to run a map based app, using com.google.andoid.maps however I get the following error:
[2012-06-03 17:12:43 - myGps] Installation error: INSTALL_FAILED_DUPLICATE_PACKAGE
[2012-06-03 17:12:43 - myGps] Please check logcat output for more details.
[2012-06-03 17:12:43 - myGps] Launch canceled!
I have succeeded installing the package several times but the app wouldn't show on the emulator's screen, now I can't even install it.
I have tried:
Reseting adb
Installing manually
Checking if the package exists in ddms
None of these worked.
com.google.andoid.maps is the default google maps package.
Try giving a different package to your application.It should work then.