flutter version created using an older version of the Android embedding - flutter

How to make run for this project in the flutter
The Problem it shows me your flutter application is created an older version of the android embedding. so what should I do to solve problem please

delete android folder of project and run following cmd
flutter create .

Related

Need help to migrating flutter project to another device

I want to migrate my flutter project to my new pc, the android studio and flutter are all set in the new pc. If I make a new flutter project, it works fine, however, if I open the project from my old PC, It cannot detect the flutter library. Any suggestions?
Flutter doctor result
Use this command
flutter clean
flutter pub get
flutter packages get
flutter packages upgrade ( Optional - use if you want to upgrade packages )
Restart Android Studio or VS Code
Hopefully the problem will be solved.

problems using the Android Studio emulator with Flutter

when i try to emulate my flutter project i get this message, does anyone know what to do? When emulating in Android Studio some project with Kotlin works perfectly
Hey you should check buildToolsVersion "29.0.3". The version might be different but there would be buildToolsVersion, note down the version and check if it is installed or update/upgrade it from file > Project Structure

How to downgrade flutter from version 2.5.3 to 1.22.6

I have some older projects built on flutter 1.22.6 and now I am working on latest version of flutter but there often comes need when I've to work on previous projects non null safety one's so when I try to downgrade flutter by giving command flutter downgrade 1.22.6 it tells me to downgrade to 2.5.2 and if I try to switch channel and then downgrade it downgrades to 2.5.2 first and then tells there is no version related to 1.22.6. This method used to be working before but now its not working anymore. I don't want to download zip files and then replace again flutter every-time I just want it to be done by cli.
My OS is windows 11
You can use flutter Version Manager fvm its specifically made to control flutter versions plus along with that you can install flutter sidekick as well. I am attaching link for you.
FVM Flutter Sidekick
Since you can no longer downgrade flutter versions, I have found the best way to do this is:
Download desired flutter version
Locate current 'flutter' folder and replace it with the desired version
if you run --flutter version after, it should show the correct version

Flutter iOS Build Error: framework not found Flutter

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

Create a new app for either iOS or Android using Flutter

How to create a new project using Flutter either for iOS or Android?
I tried with flutter create projectname but it is creating both iOS and Android platform.
Is it possible for any one platform?
You can use the --platforms parameter to specify which platforms you want to create the app for (defaults to all of them). So, if you want to create an app for only android you would do something like the following:
flutter create --platforms android my_app
Note: the -i and -a parameters are for selecting the language used, not restricting which platforms are generated.
Lastly: It does seem that you can simply delete the undesired platform directories after they are generated.
Just delete the android or ios folder created in the project.
You can also leave the folders and just not build for the platform you don't want to support.
The question is for creating a new project either for Android or iOS. Not for building.
Please follow the steps given in this tutorial Get Started.
In a nutshell
Get the Flutter SDK Update your path with flutter SDK
Run flutter doctor to make sure, flutter is installed correctly
Install the Flutter and Dart plugins for Android Studio
Create new flutter app by following this tutorial
Hope this helps
If you want to create only Android or iOS project just run
(--ios-language select between swift or object-c)
flutter create -i, --ios-language [objc (default), swift]
flutter create -a, --android-language [java (default), kotlin]
Same for android