[英]Not able to build apk for ionic3 app
我正在尝试构建apk,但出现此错误:
A problem occurred configuring project
':CordovaLib'.
Failed to notify project evaluation listener.
com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)
BUILD FAILED in 1s
(node:16884) UnhandledPromiseRejectionWarning:
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
(node:16884) UnhandledPromiseRejectionWarning:
Unhandled promise rejection.
This error originated either by throwing inside of an async function without a catch block,
or by rejecting a promise which was not handled with .catch().
(rejection id: 1)
(node:16884) [DEP0018] DeprecationWarning:
Unhandled promise rejections are deprecated.
In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
我还将environment variables
设置为JAVA_HOME
和ANDROID_HOME
您的项目中存在语法错误,请检查它。 如果您很难找到bug,请新建一个项目:$“ ionic start myApp blank”。 不要添加任何代码,然后再构建它。 如果再次出现错误,则说明您的环境变量存在问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.