Cordova not available on device on livereload


#1

The same project running on different devices with livereload. (not at the same time)
One of these devices prints the error:

“Native: tried calling BLE.isEnabled, but cordova is not available. make sure to include cordova.js or run in a device/simulator”

In prod-build it works.
And on the other device with -lc (livereload)

WTF?


#2

Fix / Workaround:

Edit the file node_modules\@ionic\app-scripts\dist\dev-server\serve-config.js
the line with Android Platform Path, to:

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

But, I cannot explain why is this working on other devices.