Task 'assembleDebug' not found in root project 'android'

Hi,

I am using Ionic 5.x in order to build a hybrid mobile app. The problem that I am facing is that when I use gradle to manually build the app I get the following error:

Task 'assembleDebug' not found in root project 'android'.

I have searched and could not find a solution to this issue. How do I go about fixing this error as I can’t get the mobile app to install on the Android Virtual Device (AVD)?

Thanks