失败:构建失败,异常出现问题,配置根项目'android' [英] Failure: build failed with an exception a proble m occured configuring root project 'android'

查看:553
本文介绍了失败:构建失败,异常出现问题,配置根项目'android'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用离子框架构建混合应用程序。
我安装了npm,cordova,ionic和android sdk。
我也设置了环境变量。
我能够运行以下命令

I m building a hybrid app using ionic framework. I did installed npm,cordova, ionic and android sdk. also I have set the environment variables. I was able to run following commands


  1. ionic start todo blank

  2. cd todo

  3. 离子平台添加android

但是当我运行
离子生成android
构建失败。

but when I run ionic build android The build fails.

BUILD FAILED

BUILD FAILED

总时间:29.551秒
失败:构建因异常而失败。

Total time: 29.551 secs FAILURE: Build failed with an exception.


  • 出现问题:
    配置根项目'android'时出现问题。

  • What went wrong: A problem occurred configuring root project 'android'.


java.lang.NullPointerException(无错误信息)

java.lang.NullPointerException (no error message)


  • 尝试:
    使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。
    错误:cmd:命令失败,退出代码1错误输出:
    FAILURE:构建失败并出现异常。

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

    出了什么问题:
    配置根项目'android'时出现问题。

    What went wrong: A problem occurred configuring root project 'android'.


    java.lang.NullPointerException(无错误消息)

    java.lang.NullPointerException (no error message)


  • 尝试:
    使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

    推荐答案

    这对我有用。只需要在CLI中设置环境变量(ANDROID_HOME& PATH)

    This worked for me.Just needed to set the environment variable(ANDROID_HOME & PATH) in the CLI

    这篇关于失败:构建失败,异常出现问题,配置根项目'android'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆