在将 ionic 应用程序部署到 android 时,它给出的错误如下,似乎缺少 gradle,但当我检查 cordova 要求时,gradle 已安装。这是怎么回事?
auli@auli-H81H3-M4:~/ionic/iProjects/gplusauth$ cordova run android
ANDROID_HOME=/home/auli/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
FAILURE: Could not determine which tasks to execute.
* What went wrong:
Task 'wrapper' not found in root project 'android'.
* Try:
Run gradle tasks to get a list of available tasks.
BUILD FAILED
Total time: 1.385 secs
Error: /usr/share/gradle/bin/gradle: Command failed with exit code 1
以下是科尔多瓦的要求:
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-24,android-23,android-22,android-21,android-20,android-19,android-18,android-17,android-16,android-15,android-14
Gradle: installed /usr/share/gradle/bin/gradle
我通过将 gradle 升级到最新版本解决了这个问题。
https://www.vultr.com/docs/how-to-install-gradle-on-ubuntu-16-10