这个错误信息表明在使用Cordova构建Android项目时遇到了问题。下面是一些可能的原因和解决方法:1. **缺少依赖项**: - 确保所有必需的依赖项都已正确安装。可以使用以下命令检查并安装缺失的依赖项: ```bash cordova plugin
摘要:今天用 WebStorm 搭建了个 cordova 项目, 准备开发一个 套壳 web网站的 android app`. 执行 cordova build android 命令报错: error log Microsoft Windows
今天用 WebStorm 搭建了个 cordova 项目, 准备开发一个 套壳 web网站的 android app`.
执行 cordova build android 命令报错:
error log
Microsoft Windows [版本 10.0.18363.959]
(c) 2019 Microsoft Corporation。保留所有权利。
C:\reps\CordovaDemo\app>cordova build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\reps\CordovaDemo\app\platforms\android\app\build.gradle' line: 20
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not initialize class com.android.build.gradle.internal.crash.PluginCrashReporter
* 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 20s
C:\reps\CordovaDemo\app\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\reps\CordovaDemo\app\platforms\android\app\build.gradle' line: 20
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not initialize class com.android.build.gradle.internal.crash.PluginCrashReporter
* 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 20s
C:\reps\CordovaDemo\app>
后面百度找到这篇文章: https://blog.csdn.net/m0_37220818/article/details/104070867 解决了。
