«java.lang.Ошибка ExceptionInInitializerError» при сборке приложения Cordova

#cordova #build

#кордова #сборка

Вопрос:

Проблема при сборке приложения Cordova. Что я сделал не так?

ОС: Ubuntu Bionic (LTS) 64 бит

ANT: версия Apache Ant (TM) 1.10.3, скомпилированная 19 июля 2018 года

Cordova: 9.0.0 (cordova-lib@9.0.1 )

Gradle: 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