简体   繁体   English

我已经安装了Android Studio,但是无法通过命令行访问gradle

[英]I have Android Studio installed, but I am unable to access gradle through command line

I have Android Studio installed, but I am unable to access gradle through command line. 我已经安装了Android Studio,但是无法通过命令行访问gradle。

gradle --version
gradle: command not found

Do I have to install it separately in if I want to use gradle for java projects or am I missing it because I haven't added to the path etc? 如果要为Java项目使用gradle,是否必须单独安装它,还是因为没有添加路径等而错过了它?

It's because gradle is not installed globally or not in your PATH environment variable. 这是因为gradle未全局安装或未在PATH环境变量中安装。

You can use gradle wrapper which is located at the project root. 您可以使用位于项目根目录的gradle包装器。 Move to project dir and run ./gradlew --version 移至项目目录并运行./gradlew --version

暂无
暂无

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

相关问题 我在 Mac (Catalina) 上安装了 Android Studio,keytool 错误:'要使用“keytool”命令行工具,您需要安装 JDK' - I have Android Studio installed on Mac (Catalina), keytool error: 'To use the “keytool” command-line tool you need to install a JDK' 我已经安装了 Android Studio 但 powershell 找不到 Gradle 和 ZD52387880E1EA22817A72D3719 - I have installed Android Studio but powershell can't find Gradle and Java 我想通过命令行安装Java,但没有sudo访问权限。 - I want to install Java through the command line but I don't have sudo access. 我是 android 开发新手,在 android 工作室遇到问题 - I am new to android development and I have a problem in android studio 我对 Gradle 与 Kotlin Android Studio 4 同步有问题 - I have problem with Gradle sync with Kotlin Android Studio 4 Android Studio:如何找到Gradle的安装位置? - Android Studio: How do I find where Gradle has been installed? 我如何在Android Studio中拥有行号 - How can i have line numbers in Android Studio 我可以在机器上同时安装Maven和Gradle吗 - Can I have both Maven and Gradle installed on my machine 我在 Android Studio 中编码,我需要从特定网页中获取并显示特定行的数据 - I am coding in Android Studio, and I need to fetch and display a specific line of data from a specific webpage Android:由于格式问题,我无法使用必须使用的URL下载图像 - Android: I am unable to download an image with the URL I have to use due to formatting issues
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM