He creado una aplicación nueva de ionic
ionic start test blank
Sin modificar nada, intento emularla para Android
ionic cordova emulate android
La salida de consola es
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).
¿Alguna idea de qué puede estar pasando? Me ocurre lo mismo con otra aplicación (he creado esta vacía para ver si también pasaba sin cambiar nada).
El error es el mismo si lanzo ionic cordova run android
- ionic 3.1.2
- cordova 7.0.1
- npm 3.10.9
ionic serve
ionic serve
es para crear un servidor local con el que ver la aplicación; el error indicado ocurre cuando el usuario ejecutaionic cordova emulate android
con lo que intenta abrir la aplicación en un simulador de android. Son cosas diferentes.