构建Cordova应用程序时出现问题。我做错了什么?
操作系统:Ubuntu Bionic(LTS)64位
ANT:于2018年7月19日编译的Apache Ant(TM)1.10.3版本
科尔多瓦:9.0.0(cordova-lib@9.0.1)
等级:Gradle 4.10.3
JRE:Java版本“ 1.8.0_201”
ANDROID_TARGET:28,26
cordova build android
运行命令后,出现如下错误:
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/home/mosta/android-studio/tools (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* Where:
Build file '/var/www/html/mobile/platforms/android/app/build.gradle' line: 20
* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.ExceptionInInitializerError (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 55s
/var/www/html/mobile/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Build file '/var/www/html/mobile/platforms/android/app/build.gradle' line: 20
* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.ExceptionInInitializerError (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 55s