当我们尝试运行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
答案 0 :(得分:3)
只需将您的Android版本降级为5
cordova platform rm android
然后
cordova platform add android@~5
它对我有用。