Deploy errors in "Build your first app" tutorial

I am new to Ionic, so I am trying to go through the Build your first app tutorial (with vue: Your First Ionic App: Vue - Ionic Documentation).

I have created my project and installed all dependencies, but when I try to deploy to mobile through Android Studio I get an error.

After running “ionic cap open android”, Android Studio opens and throws: Cannot add task ‘clean’ as a task with that name already exists. I googled the error and tried to remove the clean task from build.gradle, but then another error is thrown: The ‘java’ plugin has been applied, but it is not compatible with the Android plugins.

I am also having issues setting up a run configuration in Android Studio. I can’t choose a module when adding a configuration. Moreover, no devices are shown even though I have added a virtual device (see picture).


can you provide more information on the step leading up to deploying?