How t build the IOS BUILD from Xcode and how to solve these issues related to ios Flutter.
Try this
open terminal
flutter clean
flutter pub get
cd ios
pod install
flutter run
Related
I am using flutter to build an App for IOS and I manage to create the project smoothly. Before I put any code or dependencies I run flutter build apk and this builds the apk successfully. I then run flutter build ios and I get this error Failed to package... Command PhaseScriptExecution failed with a nonzero exit code.
I have run flutter doctor and I have no issues. I am running latest flutter version Channel stable, 2.8.0. Latest android studio version 2020.3(Arctic Fox). Latest Xcode 13.1 Release. And Latest MacOs Monterey 12.0.1.
I have tried all solutions I could google but nothing works. Why would it not run when i have not even added any of my code. Just a clean project getting stuck.
Any help is very much appreciated. Thanx
I've been trying to build an apk for my app but its failing and I don't understand why
this is what is shwoing
i tried to build using this command that was given to me in comments
flutter build apk --no-tree-shake-icons
but its showing me this new error now
Try add this when build your apk --no-tree-shake-icons
Generally, for errors that seem odd like this, running flutter clean then flutter pub get in the terminal helps.
Hey there I'm building an audio app using audioplayers package in flutter and in my code I don't have any error but when I run my app using flutter run, I'm getting these errors attached in the image.
Try Following Commands
Step 1->
flutter clean
Step 2->
flutter pub get
Step 3->
flutter run
Try Following Commands
flutter clean
then run
flutter pub get
OR
Delete your flutter cache folder inside flutter/bin directory and then try to run
I just updated Flutter plugin to 53.0.1, restarted Android Studio and hit "run" button and the error below show up:
Could not find an option named "devtools-server-address".
Close and reopen AndroidStudio resolved for me!
killall java
I downgraded from Flutter 2.0 to Flutter 1.22.5 and got this error.
To solve it,
Go to your terminal and write flutter channel stable.
Then run flutter doctor.
Now you may get another error like this -
If you have Flutter & Dart plugins already install, just ignore this error. This is a bug in Flutter 1.22.5 .
Just run the app and it will work fine!
I had the same issue but using VS Code on stable channel
Execute the following commands:
flutter channel stable
flutter upgrade
flutter clean
flutter pub get
Then, close and open your IDE
Follow the steps:
File -> Invalidate Cache and Restart. Run flutter clean Worked For me.
This so simple... Open terminal type flutter channel dev this solve your problem.
And after that flutter upgrade
Finally, flutter doctor
If it does not help:
Open terminal type flutter channel stable
And after that flutter upgrade
Finally, flutter doctor
Working without upgrading flutter
Safe fix for Mac (Android Studio 4.1+). It is in a different directory now, but the symbolic link helps.
Just run this command in the Terminal:
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
Change the version of the Android studio depending on what you have, I had 4.2 so used.
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.2/plugins ~/Library/Application\ Support/AndroidStudio4.2
Just Invalidate Cache and Restart. Worked for me.
Just close your all project and also close Android Studio and Reopen.
I am trying to build my release app in Flutter and when I run:
flutter run
everything works fine in debugging and test mode. But when I was trying to build a release app with:
flutter build apk
it creates an old first-release app of mine. That I created before and I try to reset the computer reset android and everything but not work what can I do to reset it and clear the cache?
I'm trying almost to delete and reset everything but they don't work.
What command that I have to run to fix it and create new version release apk
The solution is easy.
Just run flutter clean and run flutter build apk after that and it generates the updated app apk.
If you want to install it directly just run flutter install after the build command.
To all the beginners If you wish to release an apk of a flutter app just do:
flutter run --release
(and make sure to connect your device to a phone)
steps to ensure your phone is connected:
1. enable usb debugging mode in your phone
2.click on version number of your phone in system settings to enter into developer mode
3. change the phone mode to transferring file mode
After you run the command
go to build->apps->output->apk
run these command
flutter clean
and after that
flutter build apk --release
Run this command for making a bundle.
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
If flutter clean and flutter build apk also generates apk with old version code in your pubspec.yaml change the version like this version: 1.0.2+2
Before + it is your version name and after + sign it is your version code
NOTE: Your new version number should be in the place of 2. Or you can use different format such as 1.2+2
You can run flutter clean Then run flutter build apk --split-per-abi to split the apk. It will build three apks and you can find them in build/app/outputs/flutter-apk/
Can be done easily by Android Studio