Well please note that these errors are not appearing due to app code. These are related to ionic and cordova setup .
I agree its a fight fixing all these errors but let us help you .We also faced these issues but ionic community is great and helps in resolving issues .
To resolve this please refer :
Please make sure Java and Android Studio is installed on your system .