I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Current behavior:
When trying to build the app for android, a source path error for resources keeps occurring. To build, I first start by running cordova platform remove android. Then, I run ionic cordova resources, which prints out the following:
ionic cordova resources
[WARN] Detected locally installed Ionic CLI, but it's too old--using global CLI.
cordova-res
[cordova-res] Generated 18 resources for Android
[cordova-res] WARN: Source icon "resources/icon.png" contains alpha channel, generated icons for iOS will not.
[cordova-res]
[cordova-res] Apple recommends avoiding transparency. See the App Icon Human Interface Guidelines[1] for details. Any transparency in your icon will be filled in with white.
[cordova-res]
[cordova-res]
[cordova-res] Generated 47 resources for iOS
[cordova-res] Generated 57 resources for Windows
[cordova-res] Wrote to config.xml
Everything looks good so far. After cordova-resources runs, I then I install android by running cordova platform add android, which is when the first source path error occurs:
Using cordova-fetch for cordova-android@^8.0.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.tempiro.app
Name: Tempiro
Activity: MainActivity
Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.1.0
Source path does not exist: resources/android/icon/drawable-hdpi-icon.png
After this I run, ionic cordova build android and get the following:
ionic cordova build android
[WARN] Detected locally installed Ionic CLI, but it's too old--using global CLI.
cordova platform add android --save
Using cordova-fetch for cordova-android@^8.1.0
Platform android already added.
[ERROR] An error occurred while running subprocess cordova.
cordova platform add android --save exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
-> Seems like the platform is already there but not being detected... Once I have gotten this I have tried running, cordova remove platform android and then ionic cordova build android, and get the following:
ionic cordova build android
[WARN] Detected locally installed Ionic CLI, but it's too old--using global CLI.
cordova platform add android --save
Using cordova-fetch for cordova-android@^8.0.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.tempiro.app
Name: Tempiro
Activity: MainActivity
Android target: android-28
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@8.1.0
Source path does not exist: resources/android/icon/drawable-hdpi-icon.png
[ERROR] An error occurred while running subprocess cordova.
cordova platform add android --save exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
I'm submitting a ... (check one with "x") [x] bug report [ ] feature request
Current behavior:
When trying to build the app for android, a source path error for resources keeps occurring. To build, I first start by running cordova platform remove android. Then, I run ionic cordova resources, which prints out the following: ionic cordova resources [WARN] Detected locally installed Ionic CLI, but it's too old--using global CLI.
Everything looks good so far. After cordova-resources runs, I then I install android by running cordova platform add android, which is when the first source path error occurs:
Using cordova-fetch for cordova-android@^8.0.0 Adding android project... Creating Cordova project for the Android platform: Path: platforms/android Package: com.tempiro.app Name: Tempiro Activity: MainActivity Android target: android-28 Subproject Path: CordovaLib Subproject Path: app Android project created with cordova-android@8.1.0 Source path does not exist: resources/android/icon/drawable-hdpi-icon.png
After this I run, ionic cordova build android and get the following: ionic cordova build android [WARN] Detected locally installed Ionic CLI, but it's too old--using global CLI.
-> Seems like the platform is already there but not being detected... Once I have gotten this I have tried running, cordova remove platform android and then ionic cordova build android, and get the following:
ionic cordova build android [WARN] Detected locally installed Ionic CLI, but it's too old--using global CLI.
Here is my ionic information:
Ionic:
Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : ionic-angular 3.9.10 @ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : android 8.1.0 Cordova Plugins : no whitelisted plugins (9 plugins total)
Utility:
cordova-res : 0.15.1 native-run : 1.0.0
System:
ios-sim : 8.0.2 NodeJS : v12.18.3 (/usr/local/bin/node) npm : 6.14.5 OS : macOS Catalina Xcode : Xcode 10.2 Build version 10E125
Expected behavior:
Ionic build android should build without errors. Note: ionic serve works perfectly fine.
Steps to reproduce:
Related code:
Other information:
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):