Hi, I’m hoping someone can help me. I’m trying to learn ionic and it’s not going very well.
I’m getting an error when I run this: ionic cordova platform add android
It runs partway, then throws an error. Here is what I’m getting in the CLI:
> cordova.cmd platform add android
Using cordova-fetch for cordova-android@^8.0.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: io.ionic.starter
Name: MyApp
Activity: MainActivity
Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.0.0
config file *-Info.plist requested for changes not found at C:\Users\Admin\_Dev\_Projects\Sandbox\MyApp\platforms\android\*-Info.plist, ignoring
Installing "cordova-plugin-camera" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-ionic-keyboard" for android
Installing "cordova-plugin-ionic-webview" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-plugin-splashscreen" for android
Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-whitelist" for android
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
config file *-Info.plist requested for changes not found at C:\Users\Admin\_Dev\_Projects\Sandbox\MyApp\platforms\android\*-Info.plist, ignoring
> ionic cordova resources android --force
> cordova-res.cmd android
[cordova-res] internal/modules/cjs/loader.js:716
[cordova-res] throw err;
[cordova-res] ^
[cordova-res]
[cordova-res] Error: Cannot find module 'C:\Users\Admin\AppData\Roaming\npm\node_modules\cordova-res\bin\cordova-res'
[cordova-res] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:713:15)
[cordova-res] at Function.Module._load (internal/modules/cjs/loader.js:618:27)
[cordova-res] at Function.Module.runMain (internal/modules/cjs/loader.js:931:10)
[cordova-res] at internal/main/run_main_module.js:17:11 {
[cordova-res] code: 'MODULE_NOT_FOUND',
[cordova-res] requireStack: []
[cordova-res] }
[ERROR] An error occurred while running subprocess cordova-res.
cordova-res.cmd android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
Anyone see what might be the problem?
Thanks, Dan