Capacitor gradle sync No variants found for ':capacitor-cordova-android-plugins'

After I run ionic capacitor build android, I got this error after gradle sync in android studio:
“No variants found for ‘:capacitor-cordova-android-plugins’. Check build files to ensure at least one variant exists”
I am targeting android sdk 30 and it matches SDK platform in android studio, gradle version and some gradle info



This is build.gradle file after create android by capacitor:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

   

    repositories {

        google()

        jcenter()

    }

    dependencies {

        classpath 'com.android.tools.build:gradle:4.2.1'

        classpath 'com.google.gms:google-services:4.3.5'

        // NOTE: Do not place your application dependencies here; they belong

        // in the individual module build.gradle files

    }

}

apply from: "variables.gradle"

allprojects {

    repositories {

        google()

        jcenter()

    }

}

task clean(type: Delete) {

    delete rootProject.buildDir

}

config.xml

<preference name="android-targetSdkVersion" value="30" />

Does someone have a workaround? thanks!

Anyone any solution?