簡體   English   中英

執行離子Cordova模擬android時出錯

[英]Error while executing ionic cordova emulate android

我創建了一個新的離子應用程序

ionic start test blank

在不進行任何更改的情況下,我嘗試運行Android Emulador

ionic cordova emulate android

控制台輸出

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

有什么想法嗎? 另一個離子應用程序也會發生相同的錯誤(這個新的空白應用程序是一個測試,用於檢查問題不是由我自己引起的)。 運行ionic cordova run android時發生相同的錯誤

  • 離子性3.1.2
  • 科爾多瓦7.0.1
  • npm 3.10.9

更新:添加了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警告我有一些更新,這些更新最終以新配置顯示:

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

更新后錯誤仍然存​​在。

試圖ionic cordova run android --livereload但結果是相同的。

這應該工作:

離子科爾多瓦運行android --livereload

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM