Flutter sample build issue - flutter

I am getting this error when trying to run the sample first_app in flutter after opening it in VS CODE.
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/ts/Documents/Dev/first_app/build/ios/Debug-iphonesimulator/Runner.app: resource fork, Finder information, or similar
detritus not allowed
Command /usr/bin/codesign failed with exit code 1
Could not build the application for the simulator.
Error launching application on iPhone 8.
Does anyone know what could be causing this? Thanks!

Related

What went wrong: Execution failed for task ':app:validateSigningDebug'

here is the exception I get when I try to run simple flutter app on my physical device
I was working flutter projects on Android studio and run it successfully , but after I update it with flutter and dart , I coudn't even run a simple app .. it requires me a unique application Id
here is how my build.gradle file looks like with the to do hint
The error says Failed to create keystore, please refer to this answer

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

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

Flutter error - Exception: Gradle task assembleDebug failed with exit code -1

I'm working on a Flutter Application Project.
For a few days I have an issue when running my application. To test it, I create another project but issue is still present.
I have this exception : Gradle task assembleDebug failed with exit code -1
Issue part 1
Issue part 2
If someone has already encountered this problem or has any idea how to solve it i am really interested.
Thanks in advance.
----- UPDATE ----
My issue came from antivirus program which removed my sdkmanager.bat.
When I was doing "flutter doctor", the license was always "not accepted" and after the command "flutter doctor --android-licenses" the sdkmanager was not found.
Solution
On Windows :
do the command Windows + R
Search msconfig
Go to Services
Hide Windows Services
And find this famous antivirus
To finish, reinstall sdk tools (I have the sdk command line tools (obsolete))
I hope this will help you.
In flutter you can generate APK using this command inside your app directory:
flutter build apk --split-per-abi
This will generate 3 apks for different architecture
I have run into this issue before. This happened to me because terms and conditions that you must accept. First, go to the terminal and run
flutter doctor
It should then show you that you have not accepted the terms, and ask you if you want to accept them now. Follow the instructions on screen and accept each one, there will be around 7. After that relaunch your IDE and it should run fine now.
To reply to your answer #Landon Stahl, I haven't issue when I order flutter doctor
Before try to run
And after try to run app I have : "Android license status unknown"
after try to run

Getting error when launching flutter apps in simulators

When I open up an IOS simulator to launch my apps, it fails. Before it used to work fine. I get the following error:
Xcode build done. 12.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Could not find an option named "DartDefines".
Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.
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
Could not build the application for the simulator.
Error launching application on iPhone 11.
Exited (sigterm)
I am suspecting this error is due to not enough storage on my computer. Is that possible? Or is there any other problems?
I got the same issue after upgrading the flutter.
You must be using flutter channel beta
Try switching it to:
flutter channel dev
flutter upgrade

Flutter speech_recognition swift build error

I'm getting a build error using the flutter speech_recognition package. Try to build for iOS right now. Haven't tested Android.
I followed the installation guide. The package seem to load after modifying the .yaml file. I'm using the Visual Studio IDE on a MacBook Pro.
Launching lib/main.dart on iPhone Xʀ in debug mode...
Xcode build done. 9.8s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET speech_recognition OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/abcdefg/Development/flutter/.pub-cache/hosted/pub.dartlang.org/speech_recognition-0.3.0+1/ios/Classes/SpeechRecognitionPlugin.m:2:9: fatal error: 'speech_recognition/speech_recognition-Swift.h' file not found
#import <speech_recognition/speech_recognition-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone Xʀ.
From my dev directory. I can find speech_recognition directories, but the .h file is not anywhere to be found.
abcdefg-MacBook-Pro:Development abcdefg$ !find
find . -name speech_recognition
./learning_fluter/ios/Pods/Target Support Files/speech_recognition
./learning_fluter/ios/Pods/Headers/Public/speech_recognition
./learning_fluter/ios/Pods/Headers/Private/speech_recognition
./learning_fluter/ios/.symlinks/plugins/speech_recognition
./learning_fluter/build/ios/Debug-iphonesimulator/speech_recognition
abcdefg-MacBook-Pro:Development abcdefg$ find . -name speech_recognition-Swift.h
abcdefg-MacBook-Pro:Development abcdefg$
Any help would be appreciated!!
Make sure that the project has been created with the -i command as shown below: futter create -i swift [your_project_name].
after doing this verify that you are using in the properties of the runner SWIFT_VERSION = 4.2. since previous versions could cause this error.
And finally add below in podfile:
target 'Runner' do
  use_frameworks!