My flutter android studio terminal doesn't work - windows

If I write something such as flutter doctor inside the terminal, it saids ('flutter' is not recognized as an internal or external command, operable program or batch file.)and it doesn't work.Is there a specific place you should put the flutter file? Is there something you should add in the Enviroment variables?
(Im using a window 10)

Yes you need to add flutter to your environment path
On the Windows desktop, right-click My Computer.
In the pop-up menu, click Properties.
In the System Properties window, click the Advanced tab, and then click Environment Variables.
In the System Variables window, edit Path;
Add your <Flutter_Path>/bin
Restart your IDE and try again.

Because you are missing the PATH variables.
Follow these steps:
In Search, search for and then select: System (Control Panel)
Click the Advanced system settings link.
Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit.
In the Edit System Variable window, add C:\Windows\System32
separated by a ;. Click OK. Close all remaining windows by clicking
OK.
Restart your computer.
Now run flutter doctor

Related

How to set PowerShell 7 as default and remove other versions

I want to set PowerShell 7 as the default shell. So when I shift right click in File Explorer and click on "Open PowerShell window here" in the context menu, I want PowerShell 7 to come up.
And I want to remove completely the other versions.
Is there anyway to do that?
Follow these steps:
Click on the down arrow and press settings
A json file will open, and you will see a line near the top that has a parameter called defaultProfile with a UUID.
Also you will see a line representing the UUID of the PowerShell 7.0
Copy that UUID and put it in for defaultProfile
Good Luck!
Source:
https://www.codyhosterman.com/2020/05/defaulting-windows-terminal-to-powershell-7-x-core/
If you have Windows Terminal: Follow these steps:
Click the dropdown and go to Settings
On the General Tab, you will see default profile, click the dropdown and select the profile you would like to be default
to change powerShell version in windows 11, follow these steps
Open powerShell and go to setting by clicking down arrow
in Profiles tab (left side in menu) choose Windows PowerShell
edit the Command Line to powerShell Directory Like C:/Program Files/PowerShell/7/pwsh.exe
Save settings
that's it

android studio can not open

when I click on the android studio icon cannot open and show error.
I change the setting of the android studio from click Help > Edit Custom VM Options to open your studio.vmoptions file and write
XmxheapSize-Xmx2g
After than android studio show that error and can not open.
Press Start, type Path, and click Enter to select Edit environment variables for your account.
You will see Environment Variables.. option in System Properties panel, click that.
In System Variables part click new and in Variable name part type JAVA_HOME
and in Variable value part you should copy and paste the path of your JDK and then press Ok and restart your system. look at the images for better understanding:
I hope this solves your problem.

Changing the default path of Visual Studio Code's integrated terminal

I'm trying to change the default path of the integrated terminal in Visual Studio Code, but I'm not sure how to. I do know how to change it in the windows command prompt, but not in Visual Studio Code. I looked in user settings, but I can't find anything there to change.
The current default path is C:\Users\User_Name.
I'd like to change it to C:\Project.
How do I do this in Visual Studio Code?
Short answer
Edit the user preference "terminal.integrated.cwd": "" to the path that you want the integrated terminal to open to.
Long answer
The same answer, but the long step-by-step version,
In Visual Studio Code go to:
Menu File → Preferences → Settings
Now that you are in the "User Settings", using the "Search Settings" bar across the top of the window paste or type this:
terminal.integrated.cwd
It will list the following as a result:
// An explicit start path where the terminal will be launched, this is used
as the current working directory (cwd) for the shell process. This may be
particularly useful in workspace settings if the root directory is not a
convenient cwd.
"terminal.integrated.cwd": "",
You will notice that it will not let you type here to change this setting. That is because you can't change the default setting. You instead need to change your personal settings. Here's how...
Click the pencil icon to the left of the this option and then the "Copy to Settings" option that pops-up.
You should have a split screen in which the right side of the screen has the heading Place your settings here to overwrite the Default Settings. This is the correct place for you to make changes. You might already have a few personalized settings listed here.
When you clicked "Copy to Settings" it automatically added this line for you:
"terminal.integrated.cwd": ""
Notice that whichever item is last in this list will not have a trailing comma but any items before it in the list will require one.
FYI: you could have simply typed or copy/pasted this into the personalized settings yourself, but following these steps is the process to learn for changing other preferences as needed.
Now you are able to type to set the path you want to use. Make sure to use \\ in place of \ and you do not need the trailing \. For example including this line would always start your terminal in the baz directory:
{
"terminal.integrated.cwd": "C:\\Users\\foo\\bar\\baz"
}
To apply the change, simply Save and restart Visual Studio Code.
As others have already explained, you can add a setting to change the default folder for your integrated terminal to start in. This setting also accepts Visual Studio Code variables, so to make a relative path from the root folder of your workspace you can use ${workspaceFolder}.
For example, for your terminal to always start in the subfolder mystart, your setting would be:
"terminal.integrated.cwd": "${workspaceFolder}/mystart"
Thanks for the original answer from Peter. Definitely helped !
It has now slightly changed in more recent versions of VS Code.
Navigate to File -> Preferences -> Settings
Type cwd in search
Choose Terminal > Integrated: Cwd settings
Type the default path you want to set in the text block below (simply, no need for double hashes to escape)
No need for saving, It's automatic
Restart VS Code
terminal cwd screen
Try this option in the "Intergrated Terminal" section of Settings.
"terminal.integrated.cwd": "",
You can also set it to a relative path to the open folder with
"terminal.integrated.cwd": "./example"
So if you do menu File → Open Folder... → project, and open the terminal with your keyboard shortcut, it will open to ~/project/example automatically.
It can be a general folder like src you would always use, or a specific one (but then it would be best to save it in file .vscode/settings.json).
The below option will help you do this.
Menu File → Preferences → Settings.
Add or edit the below setting.
terminal.integrated.shell.windows": ""
From the next terminal it will be reflected.
And add file .profile to your default shell, and add the default path to it.
More information can be found
at Integrated Terminal.

Setting Python Path Permanently from cmd in windows

I have Python 3.4 installed on my C:\Python34 and I want to add this directory to my Path.
set path=%path%;C:\python34
on command prompt (win7) does this but not permanently (only for that session).
Not a Python question, just a plain Windows question. Google for "windows modify path".
These steps are from this page:
From the desktop, right-click My Computer and click Properties.
In the System Properties window, click on the Advanced tab.
In the Advanced section, click the Environment Variables button.

Vim as the default editor

I'm on Windows XP and I just installed GVim 7.3. How do I make the default editor? How can I make it run using the command prompt
e.g.
c:\Windows>gvim boot.ini
open this file in gvim.
Thanks a lot
Add Gvim to your PATH variable
To be able to call Gvim from the command line, you have to add the installation directory of Vim to your PATH variable. To do that, right click on My Computer on the desktop (or in Explorer) → Properties → Advanced Tab → Click on Button Environment Variables.
In the Dialog, go to the User Variables field and search if there is already a PATH variable. If there is a PATH Variable, select it, click Edit and change it as follows:
%PATH%;C:/Program Files/Vim/Vim73
(or whatever the installation directory of Gvim is).
If there is no PATH variable set, create a new one with the content written above.
Confirm everything with OK, then open a new command window (important!), navigate to the desired directory and type
gvim somefile.txt
This should bring up your favourite editor.
Set Gvim as default editor for a certain file type
Adding Gvim to your PATH doesn't make Gvim the default editor for a certain file type. This can be achieved the following way:
In Explorer, right click on any file and select Open With → Choose Program
in the upcoming window, select Vi improved - A Text Editor or browse for gvim.exe if the entry is not already there
select the Always use the selected program ... checkbox and click OK
from now on, every time you double-click the file, it will be opened with Gvim
The easiest way
If you install Gvim, be sure to check the Add to context menu option. If you did that, you can right click on any file in the Windows Explorer and select Edit with Vim.
Right click the any file you want to open -> select Open or Open With ->check always open with the following editor.
After installing vim the "Edit with vim..." menu item appears in the context menu (RMB click on any file to check). Thus you can edit any file (not only text file) with just selecting this menu item
Add gvim to the PATH variable and you can run it right as you want:
c:\Windows>gvim boot.ini

Resources