【问题标题】:Cordova - Error: cmd: Command failed with exit code 1Cordova - 错误:cmd:命令失败,退出代码为 1
【发布时间】:2017-06-02 06:40:09
【问题描述】:

当我们尝试运行 android 时,它总是在 cordova 上新创建的项目上报错

D:\Android\Theplug>cordova run android
ANDROID_HOME=D:\Android\android-sdk-windows
JAVA_HOME=C:\Program Files\java\jdk1.8.0_111
The system cannot find the path specified.
Error: cmd: Command failed with exit code 1

科尔多瓦要求:

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed Google Inc.:Google APIs:24,Google Inc.:Google APIs:23,
Google Inc.:Google APIs:22,Google Inc.:Google APIs:21,android-25,android-24,android-23,
android-22,android-21
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\gradle

【问题讨论】:

  • java -version 工作吗?
  • @suraj 是的,它工作正常

标签: android cordova phonegap


【解决方案1】:

只需将您的 android 版本降级到 5


cordova platform rm android

然后

cordova platform add android@~5

它对我有用。

【讨论】:

    猜你喜欢
    • 2015-10-12
    • 2017-04-03
    • 2017-12-18
    • 1970-01-01
    • 2017-01-18
    • 2018-07-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多