java - $ 不被识别为内部或外部命令

标签 java windows android-studio gradle

我正在尝试使用 Android Studio 和 Google Calendar API 开发我自己的应用。

Google 页面是这样说的:

In your working directory, run the following commands:

$ gradle init --type basic
$ mkdir -p src/main/java src/main/resources

当我尝试将它放入命令行时,它返回:

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

我是不是放错地方了?


我什至没有意识到他们假设人们正在使用 Linux。我有一台 Windows 机器。我已经尝试了所有的建议,但到目前为止没有任何进展,所以我不确定从这里去哪里。

最佳答案

完全没有问题! $ 表示需要在终端(在本例中为 Bash 终端)中运行以下命令。所以试着在你的机器上打开一个并进入项目。然后运行:

gradle init --type basic && mkdir -p src/main/java src/main/resources

编辑:将其更改为使用 && 运算符

关于java - $ 不被识别为内部或外部命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31360033/

相关文章:

用于在 Windows 中自动执行桌面事件的 Python 代码

c++ - Visual Studio 强制桌面 API

windows - 为 Windows 开发自定义打印机驱动程序

java - 如何使用 gecko 获取当前页面 URL?

java - "wrong first argument type. Found: ' android.widget.Compoundbutton.oncheckedchangelistener ', required: ' android.content.context '"

Java - 将非原始数据类型文本文件的字符串解析为整数

java - JSR223 Javascript 中的回调,Oracle JRE 1.6 和 OpenJDK 1.6 之间的区别(安装在 Debian 上)

java - 为什么这个多行 Java 模式不匹配?

android - 将 9-patch 图像添加到 Android Studio

java - 更快或更简洁地查明某个包是否已安装在 Android 上的方法