How to run Ionic project with capacitor?

I Want to run my Ionic project with capacitor and I try a different way for the run Ionic project with capacitor even I create an Ionic blank project with Ionic CLI But I can’t do that because of android studio says this error:

  error: resource style/Base.V28.Theme.AppCompat.Light (aka com.mahdi.myapp2:style/Base.V28.Theme.AppCompat.Light) not found.

This error occurs when I want to build or run my project with android studio, Inside the visual studio code, I don’t get an Error

Ionic version: 5.4.13
Node version: v10.15.3
Npm version: 6.4.1

I can run my Ionic project with Cordova, All I did recently was update my Android
Thanks for your help