简体   繁体   English

android studio 终端不接受我的命令

[英]The android studio terminal doesn't take my commands

I'm trying to update the flutter SDK, but the terminal doesn't recognize the command.我正在尝试更新 flutter SDK,但终端无法识别该命令。

 flutter upgrade
'flutter' is not recognized as an internal or external command,
operable program or batch file.

you need to export flutter to path for linux you can do something like this export PATH="$PATH: pwd /flutter/bin"你需要将flutter导出到linux的路径你可以做这样的事情export PATH="$PATH: pwd /flutter/bin"

windows视窗

If you wish to run Flutter commands in the regular Windows console, take these steps to add Flutter to the PATH environment variable:如果您希望在常规 Windows 控制台中运行 Flutter 命令,请执行以下步骤将 Flutter 添加到 PATH 环境变量:

From the Start search bar, enter env and select Edit environment variables for your account.在开始搜索栏中,输入env并选择为您的帐户编辑环境变量。 Under User variables check if there is an entry called Path: If the entry exists, append the full path to flutter\\bin using ;在用户变量下检查是否有一个名为 Path 的条目:如果该条目存在,则使用 ; 将完整路径附加到flutter\\bin中。 as a separator from existing values.作为现有值的分隔符。 If the entry doesn't exist, create a new user variable named Path with the full path to flutter\\bin as its value.如果该条目不存在,请创建一个名为 Path 的新用户变量,并将 flutter\\bin 的完整路径作为其值。

Note that you have to close and reopen any existing console windows for these changes to take effect请注意,您必须关闭并重新打开任何现有的控制台窗口才能使这些更改生效

. . this should work...if on linux run the export path command in you android studio terminal window.这应该可以工作...如果在 linux 上运行您的 android studio 终端窗口中的导出路径命令。

read more from docs文档中阅读更多内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM