I was trying to do is to build Windows desktop apps with Flutter. I just followed all the steps of installation that were written in the documentation of Flutter. I just created a simple boilerplate with the command flutter create learningflutter on my Windows 11 machine. Then I just run the flutter run -d windows command inside the directory (learningflutter), then ended up with this error:
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(489,26): error MSB4100: Expected "$([System.String]::new('%(Link.AdditionalDependencies)').Contains('atls.lib'))" to evaluate to a boolean instead of "$([System.String]::new('..\flutter\Debug\flutter_wrapper_app.lib;D:\My File\Documents\Much Aris'z\Work\Salesman Tracking\Code\salesman_tracking_applications\windows\flutter\ephemeral\flutter_windows.dll.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib').Contains('atls.lib'))", in condition "'$(ATL_KeyFile)' != '' and ('$(ConfigurationType)' == 'Application' or '$(ConfigurationType)' == 'DynamicLibrary') [D:\My File\Documents\Much Aris'z\Work\Salesman Tracking\Code\salesman_tracking_applications\build\windows\runner\salesman_tracking_applications.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(489,26): error MSB4100: and %(Link.AdditionalDependencies) != '' and $([System.String]::new('%(Link.AdditionalDependencies)').Contains('atls.lib'))". [D:\My File\Documents\Much Aris'z\Work\Salesman Tracking\Code\salesman_tracking_applications\build\windows\runner\salesman_tracking_applications.vcxproj]
Hope you found an answer, but for anyone having the same problem, I just had it and it will happen if a folder in your project's path contains a quote. If you remove that quote and delete the build folder, it will reevaluate correctly and work as expected :)
Related
I have been using Android Studio to code in Flutter and Dart but decided to switch to VS code because it's lighter. I noticed that When I'm writing and I press Cmd + S; it pops up the error
Bad CMake executable: "". Check to make sure it is installed or the value of the "cmake.cmakePath" setting contains the correct path
I have uninstalled and installed the Cmake extension but the error still persisted.
So I extracted the files in the C: drive (not the program files) and added C:\flutter\src\bin in the Path variable and when I run flutter --version in cmd it gives an error..please help
It could be great to see what the error is.
I am getting the following error when executing flutter doctor command in PowerShell:
Program 'flutter' failed to run: No application is associated with the specified file for this operation.
I have already set the environment variable for Flutter/bin, Git and Windows/System32.
Flutter commands work fine on normal cmd, but not in PowerShell which is the default in VS Code.
How to fix this?
So I'm currently following a tutorial on flutter and it showed this nifty way of running dart code in the same project by creating the new file in the app directory instead of the lib folder. I'm using VS code and can't really figure out how to run the file (they used Android Studio). I tried running the file in the terminal and it kept saying
./scratch.dart: line 1: syntax error near unexpected token `('
./scratch.dart: line 1: `void main() {'
Any idea what I'm doing wrong?
Run dart in terminal to Check that you have dart installed globally with global environment variable in your terminal. If not follow this doc to install https://dart.dev/get-dart.
After making sure that you have dart SDK installed globally in your PC, you can run any dart file containing a void main function in a terminal like
~$ dart path_to_file/scratch.dart
Note: Running un terminal will not work if you are working with a package that utilize dart:ui
I'm new to coding and recently tried to install flutter framework in git bash but there was a warning about android studio , by mistake I copied a line of code from the internet
flutter config --android-studio-dir=/my/local/path/for/android/studio
which intern is giving a new warning saying
X android-studio-dir = C:/Program Files/Git/my/local/path/for/android/studio
X Android Studio not found at C:/Program Files/Git/my/local/path/for/android/studio
please, anyone, help me
I tried to write the same code giving the value of the location where the android studio is present but it did not work
Type flutter config -h for help.
It says
To remove a setting, configure it to an empty string.
or you can set the correct value as
flutter config --android-studio-dir='correct/path/'
run flutter doctor when done