简体   繁体   English

执行离子Cordova模拟android时出错

[英]Error while executing ionic cordova emulate android

I've created a new ionic application 我创建了一个新的离子应用程序

ionic start test blank

Without making any changes, I try to run the Android emulador 在不进行任何更改的情况下,我尝试运行Android Emulador

ionic cordova emulate android

Console outputs 控制台输出

Running app-scripts build: --address 0.0.0.0 --port 8100 --p 8100 --livereload-
ort 35729 --r 35729 --iscordovaserve --externalIpRequired --nobrowser

[12:21:29]  build dev started ...
[12:21:29]  clean started ...
[12:21:29]  clean finished in 4 ms
[12:21:29]  copy started ...
[12:21:29]  transpile started ...
[12:21:31]  transpile finished in 2.53 s
[12:21:32]  preprocess started ...
[12:21:32]  deeplinks started ...
[12:21:32]  deeplinks finished in 9 ms
[12:21:32]  preprocess finished in 10 ms
[12:21:32]  webpack started ...
[12:21:32]  copy finished in 2.72 s
[12:21:40]  webpack finished in 8.93 s
[12:21:40]  sass started ...
[12:21:41]  sass finished in 877 ms
[12:21:41]  postprocess started ...
[12:21:41]  postprocess finished in 11 ms
[12:21:41]  lint started ...
[12:21:41]  build dev finished in 12.40 s
> cordova emulate android
ANDROID_HOME=C:\Desarrollo\Android\adt-bundle-windows-x86_64-20140702\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25
Error: Cannot read property 'length' of undefined


[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.

[ERROR] An error occurred while running cordova emulate android (exit code 1).

Any idea on what's happenning? 有什么想法吗? Same error ocurrs with another ionic application(this new blank one is a test to check the problem was not caused by myself). 另一个离子应用程序也会发生相同的错误(这个新的空白应用程序是一个测试,用于检查问题不是由我自己引起的)。 Same error happens when running ionic cordova run android 运行ionic cordova run android时发生相同的错误

  • ionic 3.1.2 离子性3.1.2
  • cordova 7.0.1 科尔多瓦7.0.1
  • npm 3.10.9 npm 3.10.9

UPDATE: added ionic info output 更新:添加了ionic info输出

global packages:

    @ionic/cli-utils : 1.1.2
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.1.2

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.1.2
    @ionic/cli-plugin-ionic-angular : 1.1.2
    Ionic Framework                 : ionic-angular 3.2.1

System:

    Node       : v7.1.0
    OS         : Windows 8.1
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed

ionic info warned me there were some updates, which ended up in new configuration: ionic info警告我有一些更新,这些更新最终以新配置显示:

global packages:

    @ionic/cli-utils : 1.3.0
    Cordova CLI      : 7.0.1
    Ionic CLI        : 3.3.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.3.0
    @ionic/cli-plugin-ionic-angular : 1.3.0
    Cordova Platforms               : android 6.2.3
    Ionic Framework                 : ionic-angular 3.2.1

System:

    Node       : v7.1.0
    OS         : Windows 8.1
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed

Error persists after updating. 更新后错误仍然存​​在。

Tried ionic cordova run android --livereload but the result's the same. 试图ionic cordova run android --livereload但结果是相同的。

This should work: 这应该工作:

ionic cordova run android --livereload 离子科尔多瓦运行android --livereload

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM