How to change windows build version name in Flutter? - windows

My version of Flutter is 3.3.6.
I created a Windows exe application with Flutter, but its version number has always been 1.0.0.0. I tried to change the version in pubspec.yaml, which has no effect. I tried to pass parameters in the packaging command, but it didn't take effect.
fvm flutter build windows --build-name=1.0.3 --build-number=3
Does anyone know what to do?

1- change version in pubspec.yaml
2- run command:
flutter build windows --build-name=1.0.3 --build-number=3

Your project can be updated using these steps:
Verify you are on Flutter version 3.3 or newer using flutter --version
If needed, use flutter upgrade to update to the latest version of the Flutter SDK
Backup your project, possibly using git or some other version control system
Delete the windows/runner/CMakeLists.txt and windows/runner/Runner.rc files
Run flutter create --platforms=windows .
Review the changes to your windows/runner/CMakeLists.txt and windows/runner/Runner.rc files
Verify your app builds using flutter build windows
https://docs.flutter.dev/development/platform-integration/windows/version-migration

Related

Windows Version (Unable to confirm if installed Windows version is 10 or greater) in Flutter?

I was trying to install flutter, I did all the procedure for android studio but now the "Windows Version (Unable to confirm if installed Windows version is 10 or greater)" issue appear, anybody knows how to solve this? I have W10.
i found this answer in another forum
i have the same problem but my app works just fine
try this :
flutter clean
....
flutter downgrade 1.6.3 or (1.6.6)
...
flutter channel stable
...
flutter upgrade
..
Then the editor will ask to do flutter packages get
and finally we do flutter run .
You can run the project as debug from the home file (optional).
to know if flutter is installed
run the flutter command in the cmd (Command line) :
flutter
and if you want to know the version:
flutter -v
and if you have installed the required tools to use flutter without problem :
flutter doctor

Flutter_CLI: Because every version of flutterfire_cli depends on xml >=5.3.0 which requires SDK version >=2.14.0 <3.0.0, flutterfire_cli is forbidden

I am trying to install firebase_cli for my flutter project, but it tells me:
"Because every version of flutterfire_cli depends on xml >=5.3.0 which
requires SDK version >=2.14.0 <3.0.0, flutterfire_cli is forbidden"
Showing that my SDK version is 2.13.4 and it needs 2.14.0 onwards.
I went to flutter console as administrator and run choco upgrade dart-sdk. It told me I now have version v2.17.3.
However, I still get the same problem in flutterfire_cli.
Things I've tried:
creating a .bashrc file with the line export PATH="$PATH": "C:\Users\sjrol\OneDrive\Documentos\flutter\.pub-cache\bin" in it (it is the route flutter console told me to save).
creating a system environment variable inside PATH that points to my dart folder , with the newer version.
In my pubspec.yaml file I've got .
Then rebooted the PC. Same problem. No idea of what's happening.
Dart pub global and choco upgrade results (running the firebase console as administrator):
Flutter doctor (I don't use android studio so no problem, and the android status problem is something I've been facing for a long time and has never given me any problem. Maybe it still has something to do with this?).
I can tell I'm working with the new dart version in my VSCode now, thanks to the new features it has, but firebase still won't let me install CLI. Thank you in advance for your help.
Try this:
Change your sdk version in pubspec.yaml to sdk: ">=2.17.3 <3.0.0"
Run dart --version to make sure the new path is working
Run flutter clean
Run the app

when I try to run my existing flutter project in windows version, I am getting this error

I have an flutter project which I created long back when Flutter windows became stable version I want to use same project for windows version but it says this error.
You should be able to fix this error by downloading the Nuget.exe and adding it to your Windows' path manually.
The root problem may be related to your installation of Visual Studio as described here

Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)

After updating flutter version from 1 to 2, got unresolveable errors, so deleted all flutter sdk and redownload it using this command
git clone https://github.com/flutter/flutter.git -b stable
After this i entered command flutter precache which started downloading Dart Sdk, after that it get crash always...
no matter which command i run flutter doctor or any other, it always starts with Building flutter tool... and then crash.
Also tried other related questions and their answers but no luck...
flutter precache command exceution Image
Flutter and Dart Installed Directory Image
Crash proper image
If you are facing this on the Mac OS BigSur, please install rosetta first.
To do so you can use the following command:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
It worked for me :).
Several packages are not yet fully updated for Flutter 2.0. So I recommend that you continue using Flutter 1.x until everything is resolved. The easiest way is to normally install Flutte 2.0 as if you were going to use it and then downgrade.
To download it, follow this tutorial here:
How to downgrade Flutter SDK (Dart 1.x)
When the flutter pub get fails to return the dependencies it gets stuck trying several times. And if you get a pub get via the interface you won't see any errors happening, so I recommend making flutter pub get.
Ok so i have filed this issue on flutter github.
You can checkout the link https://github.com/flutter/flutter/issues/78167
the answer they told me is: something in the certificate validation is broken on older Mac OS X versions.
Until they resolve issue for older versions of Mac OS. There are two possible solutions:
First is absolutely to upgrade Mac Version but if you have low Ram or Disk switch to solution no.2
Second solution is to downgrade flutter version.
Also like to point out that if you have installed flutter version 2, it won't downgrade to version 1 using command "Flutter Downgrade", atleast this was not working for me so i downloaded older version manually using this link: https://flutter.dev/docs/development/tools/sdk/releases?tab=macos
Try delete your flutter sdk folder and checkout it's again.
git clone https://github.com/flutter/flutter.git -b stable

Nativescript 1.3.0 intsllation issue

I will try my best to explain what I did and where I am right now. I am using window7
What I did for installation.
Installed jdk and updated the environment path variable and created new one JAVA_HOME
Downloaded Gradle and updated the environment path pointing to bin directory of gradle
Installed android sdk with all the specified version, sdk tool, and platform tools.
Created ANDROID_HOME variable.
Remove and Reinstalled Nativescript
Ran tns doctor command and result can be found here
Launched the app via tns run android --emulator and tried on device as well error received was "Unfortunately mysir has stopped" and log can be found here.
Now Can anyone please tell me what I am missing?
Check out if <your app>\platforms\android\src\main\assets\internal\prepareExtend.js file exists. This file is supposed to be created when you execute tns platform add android command. If the file does not exist then it may be better to create a new project.
well the whole problem was I was not running command npm install tns-core-modules --save after creating new project.

Resources