我对ubuntu相对较新,我目前正在离子项目中工作。当我给这个命令 sudo ionic cordova build android 时,它失败了。以下是日志
> cordova build android
Android Studio project detected
ANDROID_HOME=/usr/lib/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
Reading build config file: /home/tel/Desktop/AnimalTrackerApp/UserApplication/build.json
studio
(node:6766) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Could not find an installed version of Gradle either in Android Studio,
or on your system to install the gradle wrapper. Please include gradle
in your path, or install Android Studio
[10:57:23] lint finished in 2.01 s
但问题是我已经设置了我的gradle路径,但它显示了这个奇怪的错误。
gradle -v
------------------------------------------------------------
Gradle 4.6
------------------------------------------------------------
Build time: 2018-02-28 13:36:36 UTC
Revision: 8fa6ce7945b640e6168488e4417f9bb96e4ab46c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 1.8.0_162 (Oracle Corporation 25.162-b12)
OS: Linux 4.4.0-116-generic amd64
gradle的路径: /home/tel/.sdkman/candidates/gradle/current
为什么会出现这个错误?请帮帮我。