Ionic build command was working fine until I decided to add some custom splash screen and run the following command,
ionic resources
Delete the Android platform and give full permission to the public to the platform folder.
For me it's because the path name is too long in Windows. Renaming some folders to shorter names solved the issue.
Delete folder platform Delete folder android and ios in folder "resources" execute : ionic platform add android after execute : ionic resources and finaly execute : ionic build android