简体   繁体   English

Gredlew 任务名称 - 命令未运行 Android Studio 终端

[英]Gredlew taskname - command not running Android studio terminal

I was trying to run a Gradle command on android studio terminal but it shows like:- 'grdlew' is not recognized as an internal or external command, operable program or batch file.我试图在 android studio 终端上运行 Gradle 命令,但它显示如下:- 'grdlew' is not recognized as an internal or external command, operable program or batch file.

the exact command was 'gradlew sonar' Please guide me how to solve this.确切的命令是'gradlew sonar'请指导我如何解决这个问题。

  1. gradlew command is available in your project directory. gradlew命令在您的项目目录中可用。 If you are trying to run this command from somewhere else it will throw an error.如果您尝试从其他地方运行此命令,则会引发错误。
  2. Also, gradlew command package is automatically generated by Android Studio when you create a new project.此外,当您创建新项目时, Android Studio会自动生成gradlew命令包。 It will also prompt you to generate new gradle wrapper when you open the project.当您打开项目时,它还会提示您生成新的 gradle 包装器。

After spending lot of time into it and above solutions also not working for me I found one thing that is my system doesn't have Gradle installed so I installed Gradle into my system and provide the bin folder path in a system environment.在花了很多时间研究它之后,上面的解决方案也对我不起作用,我发现一件事是我的系统没有安装 Gradle,所以我将 Gradle 安装到我的系统中并在系统环境中提供 bin 文件夹路径。 ie IE

PATH
D:\gradle-6.0.1\bin

And then go your project directory and open cmd window there and run gradle query like this然后转到您的项目目录并在那里打开 cmd 窗口并像这样运行 gradle 查询

gradle sonarqube gradle声纳

-Dsonar.projectKey=$REPLACE_WITH_GENERATED_keyCreatedOnSonarqube -Dsonar.projectKey=$REPLACE_WITH_GENERATED_keyCreatedOnSonarqube

-Dsonar.host.url= http://localhost:9000 -Dsonar.host.url= http://localhost:9000

-Dsonar.login=$REPLACE_WITH_GENERATED_TOKEN_OnSonarqube -Dsonar.login=$REPLACE_WITH_GENERATED_TOKEN_OnSonarqube

And this made my day这让我的一天

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

相关问题 Android Studio 终端:找不到命令 - Android Studio Terminal: Command not found 从Android Studio终端运行Android模拟器 - Running Android Emulator from Android Studio terminal 在Android App中运行终端命令以路由音频 - Running Terminal Command in Android App to Route Audio 在android studio终端中无法识别git命令 - git command not recognisable in android studio terminal 在Android Studio的“终端工具窗口”中使用“重置”命令时出错 - Error on using “reset” command in “terminal tool window” of Android Studio Robolectric测试在Android Studio中运行,但不在命令行上运行 - Robolectric tests running in Android Studio but not on the command line Android Studio Terminal中带有移动命令的错误[访问被拒绝] - Error in Android Studio Terminal with Move Command [Access is denied] 如何保存 shell 命令以备下次使用(Android Studio 终端) - How to save shell command for next time use (Terminal of Android Studio) 'gradlew' 在 Android Studio 终端中未被识别为内部或外部命令错误 - 'gradlew' is not recognized as an internal or external command error in Android Studio terminal 通过Android Studio运行gradle与通过Terminal运行gradle有所不同吗? - Is running gradle via android studio different from via Terminal ?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM