在运行离子项目时出现生成失败错误,
我们通过以下命令创建离子项目:
ionic start myApp super --type=ionic-angular
我们使用休闲命令运行离子项目:
ionic cordova run android
然后我们得到休闲错误
Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Build file '/home/myApp/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 13s
/home/myApp/platforms/android/gradlew: Command failed with exit code 1
错误输出: 失败:构建失败,并出现异常。
* Where:
Build file '/home/myApp/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 13s
[ERROR] An error occurred while running subprocess cordova.
cordova run android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
现在项目配置:
node.js 8.10.0,android 8.0,cordova 9.0.0,ionic 4.12.0,gradle 5.2.1
但是我们也尝试过:
node.js 10、12和gradle 5.4.1、3.3.0等