I am able to run the app in android studios but whenever I try in xcode I get a flutter framework not found.
upgrade your flutter by doing
flutter upgrade
and it will upgrade the engine and download necessary tools.
This will even kill flutter daemons.
And run the application again
flutter run
Make sure you open .xcworkspace (and not .xcodeproj in XCode).
Ensure you have 'Flutter.Framework' listed under "Linked Frameworks and Libraries". If not, just drag and drop it from the main project. Like below
I was facing the same error whene I try to archive in Xcode
I fixed it by
flutter upgrade
and
flutter run
I fixed this by switching to the master channel, and switching back to the stable channel. Also remember to run 'flutter upgrade' after switching.
Delete the flutter directory.
Download new flutter
Extract it and put it where you want.
Run the command export PATH="$PATH:`pwd`/flutter/bin"
if the command does not work then specify your path like bellow
export PATH="$PATH: /Users/{your user name}/Documents/src/flutter/bin"
Restart your machine and you are ready to go.
After that - inside your project's ios directory -
delete the .symlink directory
delete the Pods directory
delete the Podfile.lock file
and now run -
flutter clean
flutter packages upgrade
flutter build ios
For me nothing worked except, deleting my flutter files fully and reinstalling.
Use this flutter docs for reinstallation: Flutter Installation Link
I tried everything nothing worked except:-
Flutter upgrade
Flutter run
and boom- Build succeeded!
Please try the following steps:
Delete the flutter SDK
Download the same flutter SDK and re-install it
restart the android studio
It should be worked well.
Fixed by switching branches from beta to master
Related
I am trying to run my flutter application in ios, and while pod installs I am getting an error ([!] No podspec found for flutter_user_agentx in .symlinks/plugins/flutter_user_agentx/ios). I am using a dependency named "flutter_user_agentx", On android is working fine, a Few days back it was working fine for ios also but today I am getting this error.
I want to run my flutter application on ios.
This usually happens when you add a new package and there are no pods for ios for that package. However, you will get a lot of pods problem, but mostly following these steps will solve them:
run flutter clean
Delete the following files in the ios folder: Podfile and Podfile.lock and the folder Pods
run flutter pub get
go to the 'ios' folder using cd ios
run pod install --repo-update (to install the pods again, and if u face any problem try without --repo-update)
Run your app, from command line using 'flutter run' which will take a little bit longer
It seems that package is broken in iOS.It's a fork of the original repo. Not the official one.
Use the below package instead.
https://pub.dev/packages/fk_user_agent
GitHub issue link
I am trying to develop a desktop application and I tried to switch to dev mode using this command flutter channel dev but since then all the flutter command I tried to run are not working. Below sis the error it's showing everytime I run any flutter command.
flutter/version: Operation not permitted
What can I do to solve this?
Easiest way would be to remove the current Flutter installation folder and extract a fresh one with the desired version. You do not have to change anything else, just extract the Flutter SDK in place of the old one and run flutter doctor.
in terminal write flutter channel stable
just run
flutter channel stable && flutter upgrade
I try to build IOS version to my flutter app
I'm using virtual box with macOC catalina
after edit flutter & app path in XCode like:
when I start to build app archive, XCode show this code
That mean its still looking for flutter windows path (C:\src\flutter..........)
what's wrong here?!
Before running your project in xcode
Do
flutter clean
flutter pub get
go yo your iOS directory in side terminal and run pod install
And remember to run flutter commands you have to download flutter SDK (in your MacOs)
My App have a Problem so I Need to do flutter clean before I can debug my app.
So I do flutter clean and after that flutter run in my Terminal.
Then my App debug. After that flutter creates a new build folder, new .flutter-plugins and .flutter-plugins-dependencies.
Now I think the problem is not there but sometimes it creates the files.
Can I delete the files? And how can I fix it?
PS: I have the newest version of flutter and Xcode. And I work with VSCode and I work on a MacBook with the newest Version.
I'm not sure about this, but in one case I tried adding resource permission from info.plist(I messed with internal storage permission), I noticed similar behaviour.
While trying to build flutter ios app for release I am getting this error every time
Failed to find snapshot: /var/containers/Bundle/Application/19D78607-A03B/Runner.app/Frameworks/App.framework/flutter_assets/kernel_blob.bin
I have tried these things to correct it but failed
running flutter clean and then flutter run --release
changing flutter channel to beta and master
deleting build folder and then flutter clean and flutter run --release
flutter clean > flutter build ios > archive in Xcode to test on the test flight
Does anyone know how to fix it?
I've been seeing this issue frequently over the last few days. I recreated my ios directory which fixed the issue temporarily, but it came back.
What I learned is that it is expected that kernel_blob.bin is not present in release builds, because that file contains your Dart sources in bytecode form ready for JIT, but release builds don't use JIT, they use AOT and your Dart files are compiled into a binary that is placed under App.framework. Rather, this error happens because the release build of the app is incorrectly incorporating the debug (i.e. JIT) version of the Flutter engine.
The best solution I've found so far is to move the build folder to the trash (flutter clean is not working and hangs indefinitely on deleting the build folder for some reason), run flutter clean, run flutter build ios --release from the command line first, then (in my case) create the archive in Xcode.
Run flutter doctor -v
I have resolved this problem, if someone happened, you can try this.
Remove Flutter.framework, build again. Make sure Flutter.framework and App.framework are the same debug or release mode.
Run the following from a terminal, this removes "ios/Flutter/App.framework" and everything underneath it:
rm -rf ios/Flutter/App.framework
and then rebuild your app from xCode. This solved this problem for me.