Error: Program type already present: com.getcapacitor.AndroidProtocolHandler

Solution:

Change

implementation project(':capacitor-android')

to

implementation 'ionic-team:capacitor-android'

in build.gradle of Module: app.