错误在构建离子android应用程序时无法读取null的属性'1'

时间:2018-05-31 13:28:02

标签: android cordova ionic3

我对Ionic Cordova应用程序非常陌生。我正在尝试使用以下命令构建我的Android平台的离子应用程序 -

ionic cordova build android

但它始终因以下错误而失败

ERROR building one of the platforms: TypeError: Cannot read property '1' of null
You may not have the required environment or OS to build this project
Error: Cannot read property '1' of null
[ERROR] An error occurred while running cordova build android (exit code 1).

我有以下配置 -

JDK 10.1, Cordova 6.0, Ionic 3

1 个答案:

答案 0 :(得分:0)

你的cordova版本已经过时了。 当前版本为8.0.0。 您需要更新此cli包。

其次,cordova只能使用JDK 1.8。您必须安装此版本并相应地设置JAVA_HOME。