If my memory is correct I think this is the same issue happened to me when I created a new project with Ionic 4. What I did is I removed the platforms, www folder and the config file then add them again
If you want build/run android apk file then you have must install android studio and create blank project and add AVD. After this you can use ionic cordova platform add android to add android platform.
Hi @claudiocfls
remove android platform, don’t give sudo command for ionic cordova platform add android. because android and ios platform internal files dynamically generated. generating time process control unable to modify the newly generated files because no access for modifications. that time you will face above error. just go with normal commands. like
ionic cordova platform add android@8.0.0