我已經設置了所有必需的環境。爲了證實我檢查使用命令「離子cordova構建android」未能buld apk
這些都給結果如下
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-24,Google
Inc.:Google API來構建Android要求:24,Android的23
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-3.2\bin\gradle
當我試圖用命令構建apk時
ionic cordova build android
我得到如下
> ionic cordova prepare
> cordova prepare
- Running command [12:17:44] lint finished in 4.70 s
√ Running command - done!
> cordova build android
× Running command - failed!
[ERROR] An error occurred while running cordova build android (exit code 1):
ANDROID_HOME=C:\Users\Arunkumar.DESKTOP-59TSCLF\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
The system cannot find the path specified.
Error: cmd: Command failed with exit code 1
我在環境變量中設置了android sdk和java的路徑 –