离子cordova构建android失败

时间:2017-08-20 18:59:22

标签: cordova ionic2

我正在尝试运行离子cordova构建android,但它失败了以下错误:

  

PS C:\ Users \ Dell \ Desktop \ recipe>离子cordova构建android?该   Ionic CLI(本地版本)有可用的更新(3.7.0 => 3.9.2)!   你想安装吗?否[INFO]不自动更新   你的CLI。您可以手动更新:

   npm install --save-dev --save-exact ionic@latest
     

运行app-scripts build:--build --iscordovaserve --nobrowser

     

[00:09:37]构建开发... [00:09:37]干净的开始......   [00:09:37]干净完成12毫秒[00:09:37]复制开始...   [00:09:37] transile开始... [00:09:43] transile完成了   5.09 s [00:09:43]预处理开始... [00:09:43]深层链接开始... [00:09:43]深层链接在127毫秒完成[00:09:43]   预处理在129毫秒完成[00:09:43] webpack开始...   [00:09:44]复制完成于6.24 s [00:09:59] webpack完成   15.82 s [00:09:59] sass开始... [00:10:02] sass在3.59 s完成[00:10:02]后期处理开始... [00:10:02]后处理完成   在7毫秒[00:10:02] lint开始... [00:10:02]构建开发完成了   24.82 s

     
    

离子cordova准备     科尔多瓦准备|运行命令[00:10:09] tslint:C:/Users/Dell/Desktop/recipe/src/pages/shopping-list/shopping-list.ts,     线:2                 所有进口都未使用。

  
   L1:  import { Component } from '@angular/core';
   L2:  import { IonicPage, NavController, NavParams } from 'ionic-angular';
   L3:  import { IngredientService } from "../../service/shopping-list";
     

[00:10:09] tslint:   C:/Users/Dell/Desktop/recipe/src/pages/edit-recipe/edit-recipe.ts,   线:3               所有进口都未使用。

   L2:  import { IonicPage, NavController, NavParams, ActionSheetController, AlertController, ToastController } from
     

'ionic-angular';          L3:从“../../models/Recipe”导入{Recipe};          L4:从“@ angular / forms”导入{FormGroup,FormControl,Validators,FormArray};

     

[00:10:09] tslint:   C:/Users/Dell/Desktop/recipe/src/pages/tabs/tabs.ts,第2行:               所有进口都未使用。

   L1:  import { Component } from '@angular/core';
   L2:  import { IonicPage, NavController, NavParams } from 'ionic-angular';
   L3:  import { ShoppingListPage } from "../shopping-list/shopping-list";
     

[00:10:09] lint在6.88秒完成√运行命令 - 完成!

     

您已选择退出遥测。要更改此设置,请运行:cordova   遥测。

     
    

cordova build android×运行命令 - 失败!

  
     

[错误] Cordova遇到错误。           您可以通过直接运行上面的Cordova命令获得更多洞察力。

     

[错误]运行cordova build android时出错(退出   代码1):

    You have been opted out of telemetry. To change this, run: cordova telemetry on.
    ANDROID_HOME=C:\Users\Dell\AppData\Local\Android\sdk
    JAVA_HOME=C:\Program Files (x86)\java\jdk1.8.0_144
    Subproject Path: CordovaLib
    Starting a Gradle Daemon (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/3.3/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


    * 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.

    * 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/3.3/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


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

这就是我在运行离子信息时所得到的:

cli packages: (C:\Users\Dell\Desktop\recipe\node_modules)

    @ionic/cli-plugin-cordova       : 1.6.2
    @ionic/cli-plugin-ionic-angular : 1.4.1
    @ionic/cli-utils                : 1.7.0
    ionic (Ionic CLI)               : 3.7.0

global packages:

    Cordova CLI : 7.0.1

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.6.0

System:

    Node : v6.11.2
    OS   : Windows 10
    npm  : 5.3.0

我已经安装了android studio,并且在此之前我确实构建了一个应用程序。为什么我会在这个上得到错误。有人可以帮助。

0 个答案:

没有答案