google 云 SDK 安装中的 gcloud beta 模拟器数据存储区启动错误

gcloud beta emulators datastore start error in google cloud SDK installation

我尝试安装 Google 的云 SDK 但没有成功,因为我在尝试启动模拟器后 运行 出现以下错误。

WARNING: Reusing existing data in [C:\Users\User\AppData\Roaming\gcloud\emulators\datastore].
Executing: cmd /c C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\cloud-datastore-emulator\cloud_datastore_emulator.cmd start --host=localhost --port=8900 --store_on_disk=True --consistency=0.9 --allow_remote_shutdown C:\Users\User\AppData\Roaming\gcloud\emulators\datastore
[datastore] 'C:\Program' is not recognized as an internal or external command

我做了以下事情:

正在重启我的机器

正在重新安装 Google 云 SDK

我没有像其他人那样安装 "App engine server"。

我当然按照 https://cloud.google.com/datastore/docs/tools/datastore-emulator

中描述的步骤执行命令 "gcloud beta emulators datastore start"

'cloud_datastore_emulator.cmd'里面的内容

setlocal

set GCD_DIR=%~dp0
set DATASTORE_JAR="%GCD_DIR%CloudDatastore.jar"

if NOT EXIST %DATASTORE_JAR% (
  echo %DATASTORE_JAR% not found
  exit /B 1
)

java -cp %DATASTORE_JAR% ^
    com.google.cloud.datastore.emulator.CloudDatastore %* 

endlocal

它可以在我大学的计算机上使用相同的文件命名

请问任何问题,如果有什么不清楚的?

这里是 ChrisV 的学院之一。

根据@Dan Cornilescu 的评论,我们检查了 Chris 的路径,果然,他的用户文件夹有一个空格,因为他使用了他的全名。 运行 没有空格的用户设置有效。

解决方案:确保用户文件夹不包含空格。例如。 "C:\Users\mjh" 可以,但 "C:\Users\Martin Jul Hammer" 不行。

感谢丹的帮助!