Skip to content

Console logging is not visible when running in Android emulator #10713

@dlemphers

Description

@dlemphers

Ionic version: (check one with "x")
[ ] 1.x
[ x] 2.x

I'm submitting a ... (check one with "x")
[ x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:

Create a new project using ionic start.
Run ionic emulate|run android -l -c -s
Edit page
Save

Android emulator reloads app, however there are no console logs.

If I connect ddms and run logcat I can see the log statements appearing.

Expected behavior:

Android emulator should reload and console logging should appear in terminal.

If I update the scripts section of the package.json to look like this:

"build": "ionic-app-scripts build --dev",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "build",
"deploy:before": "build",
"build:before": "build",
"run:before": "watch"

Then console logs appear and reloading works but is flakey and the app won't reload properly and hangs with white screen of death.

Steps to reproduce:

Related code:

ionic run android -l -c -s
ionic emulate android -l -c -s

ionic run android -l -c
ionic emulate android -l -c

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.5.0 
Ionic Framework Version: 2.2.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.4
Node Version: v6.10.0
Xcode version: Not installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions