$sudo ionic cordova resources android
Collecting resource configuration and source images - done!
Filtering out image resources that do not need regeneration - done!
Uploading source images to prepare for transformations - done!
[WARN] Error occurred during command execution from a CLI plugin
(@ionic/cli-plugin-cordova).
Generating platform resources: 9 / 18 complete - failed!
Error: socket hang up
Never run ionic under sudo. You will screw up permissions all over the place.