Having An issue while trying to add splash screen

$sudo ionic cordova resources android
:heavy_check_mark: Collecting resource configuration and source images - done!
:heavy_check_mark: Filtering out image resources that do not need regeneration - done!
:heavy_check_mark: Uploading source images to prepare for transformations - done!
[WARN] Error occurred during command execution from a CLI plugin
:heavy_multiplication_x: 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.