Ionic2-Android构建失败 [英] Ionic2 - Android build failed

查看:116
本文介绍了Ionic2-Android构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Win 7(32 bt)系统上使用Android平台构建Ionic2应用程序.

I was trying to build an Ionic2 app with Android platform on my Win 7 (32 bt) system.

我在CLI中运行了ionic build android命令,并发生了以下错误:

I ran the ionic build android command in the CLI and the following error occurred :

...ionic build android

> ionic-hello-world@ ionic:build D:\<path>
> ionic-app-scripts build

[20:12:32]  ionic-app-scripts 1.0.0
[20:12:32]  build dev started ...
[20:12:32]  clean started ...
[20:12:32]  clean finished in 10 ms
[20:12:32]  copy started ...
[20:12:32]  transpile started ...
[20:12:37]  transpile finished in 5.47 s
[20:12:37]  webpack started ...
[20:12:38]  copy finished in 5.74 s
[20:12:49]  webpack finished in 11.84 s
[20:12:49]  sass started ...
[20:12:52]  sass finished in 2.81 s
[20:12:52]  build dev finished in 20.16 s

[20:12:58]  tslint: D:/../src/app/app.component.ts, line: 3
            Unused import: 'OneSignal'

       L2:  import { Platform } from 'ionic-angular';
       L3:  import { StatusBar, Splashscreen, OneSignal } from 'ionic-native';

ANDROID_HOME=C:\Users\<user-name>\AppData\Local\Android\android-sdk

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60

Subproject Path: CordovaLib

Starting a new Gradle Daemon for this build (subsequent builds will be faster).

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

然后按照建议阅读" https://docs.gradle. org/2.14.1/userguide/gradle_daemon.html ",并使用以下

Then as suggested I read the 'https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html' and created the gradle.properties file with the following

org.gradle.daemon=true

错误仍然存​​在,结果相同!!!

The error still persists with the same result !!!

出了什么问题?请帮忙.

What is going wrong ?? Please help .

推荐答案

尝试使用cordova platform add https://github.com/apache/cordova-android

自从更新Ionic以来,我就不得不开始使用此命令.

Ive had to start using this command ever since updating Ionic.

这篇关于Ionic2-Android构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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