3

Steps to Reproduce:

I create a new angular based starter - blank - Ionic 7 project via

ionic start testapp

I then added the cordova android platform with the following command:

ionic cordova platform add android

I run the following command to do a livereload:

ionic cordova run android -l

it compile and install device successfully. But after app start splash screen have appeared then give error as following screen.

enter image description here

My ionic info as following:

`Ionic:

   Ionic CLI                     : 7.1.5 (C:\Users\POLAT\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 7.5.4
   @angular-devkit/build-angular : 16.2.10
   @angular-devkit/schematics    : 16.2.10
   @angular/cli                  : 16.2.10
   @ionic/angular-toolkit        : 7.0.0

Cordova:

   Cordova CLI       : 12.0.0 ([email protected])
   Cordova Platforms : android 12.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 3 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 2.0.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\POLAT\AppData\Local\Android\Sdk)
   NodeJS            : v18.18.1 (C:\Program Files\nodejs\node.exe)
   npm               : 10.2.3
   OS                : Windows 10`

when I run the following command:

`ionic cordova run android` or `ionic cordova run android -l --external` it is work successfully. But I will use "navigator.mediaDevices" in my project. If I use --external parameter in my command, "navigator.mediaDevices" is undefined. Without -l and external parameter, "navigator.mediaDevices" is work as expected. So I need to work with `ionic cordova run android -l` command.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.