Hi Mohit,
sorry for the delay in answering, it's been some crazy months lately.
The error you're describing was fixed already. However, in order to make external plugins and database work with AOT you need to modify a couple of things in ionic and angular. I'll add the instructions to the guide during today:
https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2
Cheers,
Dani