4
votes

im trying to run the command to run my ionic 3 application on the Android emulator by using

ionic cordova run android

however after I run the command, the emulator does not start or anything happens

i just get the following

[18:06:47] lint started ... [18:06:47] build dev finished in 10.52 s

cordova run android Android Studio project detected

(node:4268) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be one of type string or Buffer at validChunk (_stream_writable.js:253:10) at Socket.Writable.write (_stream_writable.js:288:21) at Socket.stream.write (C:\Users\pkhon\AppData\Roaming\nvm\v8.4.0\node_modules\cordova\node_modules\ansi\lib\newlines.js:36:21) at Object. (C:\Users\pkhon\WebstormProjects\fcmPractice\myApp\plugins\cordova-plugin-fcm\scripts\fcm_config_files_process.js:80:24) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3) at Module.require (module.js:604:17) (node:4268) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a p romise which was not handled with .catch(). (rejection id: 1) (node:4268) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a no n-zero exit code.

[OK] Your app has been deployed. Did you know you can live-reload changes from your app with --livereload?

[18:06:54] lint finished in 7.32 s

ionic info:

C:\Users\pkhon\WebstormProjects\fcmPractice\myApp>ionic info

cli packages: (C:\Users\pkhon\AppData\Roaming\nvm\v8.4.0\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v9.4.0
    npm               : 5.3.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\pkhon\AppData\Local\Android\Sdk

Misc:

    backend : legacy
1
have u created emulator try to run the emulator first from android studio and then try to run the appNidhin Kumar
@Nidhinkumar kumarhi yes i did, and it runs successfully. i actually created a new ionic project and ran the command it worked on the emulator but it does not for this projectzuest

1 Answers

-1
votes

Change android version < 7

<engine name="android" spec="6.3.0" />