Skip to content

Cordova not available when using livereload on CLI 3.19.1 on Android Emulator #2973

Closed

Description

@prasanthnv

cli packages: (/usr/local/lib/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 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Node  : v9.4.0
npm   : 5.6.0 
OS    : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b 

Environment Variables:

ANDROID_HOME : Users/prasanthvenugopal/Library/Android/sdk

Misc:

backend: pro

screen shot 2018-02-02 at 5 39 13 pm

Cordova not available in android emulator while live-reload turned ON. Cordova detected when running without live-reload.
But in case of IOS, it works perfectly fine with live-reload.

Activity

  1. stanlleyramalho commented on Feb 16, 2018

    @stanlleyramalho

    Replace in node_modules/@ionic/app-scripts/dist/dev-server/serve-config.js:

    exports.ANDROID_PLATFORM_PATH = path.join('platforms', 'android', 'assets', 'www');

    to

    exports.ANDROID_PLATFORM_PATH = path.join('platforms', 'android', 'app', 'src', 'main', 'assets', 'www');

  2. imhoffd commented on Feb 21, 2018

    @imhoffd
    Contributor

    Thanks for posting the issue! This is actually a duplicate issue of ionic-team/ionic-app-scripts#1380

  3. prasanthnv commented on Feb 28, 2018

    @prasanthnv
    Author

    I downgraded android platform version to 6+ and it works fine.

  4. stenioanibal commented on Apr 11, 2018

    @stenioanibal

    Hello! Before days ago i had this problem and, most solutions not works for me, including @stanlleyramalho solution. After tests and searchs, i finded another similar solution and this works for me!

    Edit file node_modules/@ionic/app-scripts/dist/dev-server/serve-config.js and change last line to:

    exports.ANDROID_PLATFORM_PATH = path.join('platforms', 'android', 'app/src/main', 'assets', 'www');
    

    In bad case, run ionic cordova platform remove android and add again.

    I expect this works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions