Issue with capacitor-community/admob when trying to build project

Hey everyone!

I am using capacitor-community/admob in my Ionic 5 and Capacitor 3 project. I have completed all the setup as per documentation but I run into this problem when I’m try to run the application on a mobile device.

> Task :capacitor-android:compileDebugJavaWithJavac
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:12: error: cannot find symbol
[capacitor]         import com.getcapacitor.community.admob.helpers.AuthorizationStatusEnum;
[capacitor]         ^
[capacitor]         symbol:   class AuthorizationStatusEnum
[capacitor]         location: package com.getcapacitor.community.admob.helpers
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:14: error: cannot find symbol
[capacitor]         import com.getcapacitor.community.admob.interstitial.InterstitialAdCallbackAndListeners;
[capacitor]         ^
[capacitor]         symbol:   class InterstitialAdCallbackAndListeners
[capacitor]         location: package com.getcapacitor.community.admob.interstitial
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:16: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.MobileAds;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:17: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.RequestConfiguration;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:18: error: package com.google.android.gms.ads.initialization does not exist
[capacitor]         import com.google.android.gms.ads.initialization.InitializationStatus;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:19: error: package com.google.android.gms.ads.initialization does not exist
[capacitor]         import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:17: error: cannot find symbol
[capacitor]         import com.getcapacitor.community.admob.models.AdMobPluginError;
[capacitor]         ^
[capacitor]         symbol:   class AdMobPluginError
[capacitor]         location: package com.getcapacitor.community.admob.models
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:20: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdListener;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:21: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdRequest;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:22: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdSize;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:23: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdView;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:24: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.LoadAdError;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:25: error: package com.google.android.gms.common.util does not exist
[capacitor]         import com.google.android.gms.common.util.BiConsumer;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\Executor.java:8: error: package com.google.android.gms.common.util does not exist
[capacitor]         import com.google.android.gms.common.util.BiConsumer;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\rewarded\AdRewardExecutor.java:11: error: cannot find symbol
[capacitor]         import com.getcapacitor.community.admob.models.AdMobPluginError;
[capacitor]         ^
[capacitor]         symbol:   class AdMobPluginError
[capacitor]         location: package com.getcapacitor.community.admob.models
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\rewarded\AdRewardExecutor.java:14: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdRequest;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\rewarded\AdRewardExecutor.java:15: error: package com.google.android.gms.ads.rewarded does not exist
[capacitor]         import com.google.android.gms.ads.rewarded.RewardedAd;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\rewarded\AdRewardExecutor.java:16: error: package com.google.android.gms.common.util does not exist
[capacitor]         import com.google.android.gms.common.util.BiConsumer;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:10: error: cannot find symbol
[capacitor]         import com.getcapacitor.community.admob.models.AdMobPluginError;
[capacitor]         ^
[capacitor]         symbol:   class AdMobPluginError
[capacitor]         location: package com.getcapacitor.community.admob.models
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:13: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdRequest;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:14: error: package com.google.android.gms.ads.interstitial does not exist
[capacitor]         import com.google.android.gms.ads.interstitial.InterstitialAd;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:15: error: package com.google.android.gms.common.util does not exist
[capacitor]         import com.google.android.gms.common.util.BiConsumer;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:31: error: cannot find symbol
[capacitor]         private AdView mAdView;
[capacitor]         ^
[capacitor]         symbol:   class AdView
[capacitor]         location: class com.getcapacitor.community.admob.banner.BannerExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\banner\BannerExecutor.java:37: error: cannot find symbol
[capacitor]         BiConsumer<String, JSObject> notifyListenersFunction,
[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.banner.BannerExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\AdOptions.java:5: error: cannot find symbol
[capacitor]         import com.getcapacitor.community.admob.banner.BannerAdSizeEnum;
[capacitor]         ^
[capacitor]         symbol:   class BannerAdSizeEnum
[capacitor]         location: package com.getcapacitor.community.admob.banner
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\Executor.java:14: error: cannot find symbol
[capacitor]         protected BiConsumer<String, JSObject> notifyListenersFunction;
[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.models.Executor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\Executor.java:25: error: cannot find symbol
[capacitor]         BiConsumer<String, JSObject> notifyListenersFunction,
[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.models.Executor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\rewarded\AdRewardExecutor.java:20: error: cannot find symbol
[capacitor]         public static RewardedAd mRewardedAd;
[capacitor]         ^
[capacitor]         symbol:   class RewardedAd
[capacitor]         location: class com.getcapacitor.community.admob.rewarded.AdRewardExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\rewarded\AdRewardExecutor.java:25: error: cannot find symbol
[capacitor]         BiConsumer<String, JSObject> notifyListenersFunction,
[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.rewarded.AdRewardExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\rewarded\AdRewardExecutor.java:32: error: cannot find symbol
[capacitor]         public void prepareRewardVideoAd(final PluginCall call, BiConsumer<String, JSObject> notifyListenersFunction) {
[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.rewarded.AdRewardExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\rewarded\AdRewardExecutor.java:56: error: cannot find symbol
[capacitor]         public void showRewardVideoAd(final PluginCall call, BiConsumer<String, JSObject> notifyListenersFunction) {[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.rewarded.AdRewardExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:19: error: cannot find symbol
[capacitor]         public static InterstitialAd interstitialAd;
[capacitor]         ^
[capacitor]         symbol:   class InterstitialAd
[capacitor]         location: class com.getcapacitor.community.admob.interstitial.AdInterstitialExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:21: error: cannot find symbol
[capacitor]         InterstitialAdCallbackAndListeners adCallbackAndListeners;
[capacitor]         ^
[capacitor]         symbol:   class InterstitialAdCallbackAndListeners
[capacitor]         location: class com.getcapacitor.community.admob.interstitial.AdInterstitialExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:26: error: cannot find symbol
[capacitor]         BiConsumer<String, JSObject> notifyListenersFunction,
[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.interstitial.AdInterstitialExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:28: error: cannot find symbol
[capacitor]         InterstitialAdCallbackAndListeners adCallbackAndListeners
[capacitor]         ^
[capacitor]         symbol:   class InterstitialAdCallbackAndListeners
[capacitor]         location: class com.getcapacitor.community.admob.interstitial.AdInterstitialExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:34: error: cannot find symbol
[capacitor]         public void prepareInterstitial(final PluginCall call, BiConsumer<String, JSObject> notifyListenersFunction) {
[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.interstitial.AdInterstitialExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\interstitial\AdInterstitialExecutor.java:58: error: cannot find symbol
[capacitor]         public void showInterstitial(final PluginCall call, BiConsumer<String, JSObject> notifyListenersFunction) {
[capacitor]         ^
[capacitor]         symbol:   class BiConsumer
[capacitor]         location: class com.getcapacitor.community.admob.interstitial.AdInterstitialExecutor
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\AdOptions.java:24: error: cannot find symbol
[capacitor]         public final BannerAdSizeEnum adSize;
[capacitor]         ^
[capacitor]         symbol:   class BannerAdSizeEnum
[capacitor]         location: class com.getcapacitor.community.admob.models.AdOptions
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\AdOptions.java:80: error: cannot find symbol
[capacitor]         private AdOptions(String id, boolean isTesting, String position, int margin, boolean npa, BannerAdSizeEnum adSize) {
[capacitor]         ^
[capacitor]         symbol:   class BannerAdSizeEnum
[capacitor]         location: class com.getcapacitor.community.admob.models.AdOptions
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\AdOptions.java:94: error: cannot find symbol
[capacitor]         private static BannerAdSizeEnum adSizeStringToAdSizeEnum(String sizeString) {
[capacitor]         ^
[capacitor]         symbol:   class BannerAdSizeEnum
[capacitor]         location: class com.getcapacitor.community.admob.models.AdOptions
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\helpers\AdViewIdHelper.java:6: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdRequest;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\helpers\AdViewIdHelper.java:7: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdView;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\helpers\AdViewIdHelper.java:13: error: cannot find symbol
[capacitor]         public static String getFinalAdId(AdOptions adOptions, AdRequest adRequest, String logTag, Context context)
{
[capacitor]         ^
[capacitor]         symbol:   class AdRequest
[capacitor]         location: class com.getcapacitor.community.admob.helpers.AdViewIdHelper
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\helpers\AdViewIdHelper.java:26: error: cannot find symbol
[capacitor]         public static void assignIdToAdView(AdView adView, AdOptions adOptions, AdRequest adRequest, String logTag,
Context context) {
[capacitor]         ^
[capacitor]         symbol:   class AdView
[capacitor]         location: class com.getcapacitor.community.admob.helpers.AdViewIdHelper
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\helpers\AdViewIdHelper.java:26: error: cannot find symbol
[capacitor]         public static void assignIdToAdView(AdView adView, AdOptions adOptions, AdRequest adRequest, String logTag,
Context context) {
[capacitor]         ^
[capacitor]         symbol:   class AdRequest
[capacitor]         location: class com.getcapacitor.community.admob.helpers.AdViewIdHelper
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\helpers\RequestHelper.java:5: error: package com.google.ads.mediation.admob does not exist
[capacitor]         import com.google.ads.mediation.admob.AdMobAdapter;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\helpers\RequestHelper.java:6: error: package com.google.android.gms.ads does not exist
[capacitor]         import com.google.android.gms.ads.AdRequest;
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\helpers\RequestHelper.java:17: error: cannot find symbol
[capacitor]         public static AdRequest createRequest(AdOptions adOptions) {
[capacitor]         ^
[capacitor]         symbol:   class AdRequest
[capacitor]         location: class com.getcapacitor.community.admob.helpers.RequestHelper
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\AdOptions.java:165: error: cannot find symbol
[capacitor]         private BannerAdSizeEnum adSize = BannerAdSizeEnum.ADAPTIVE_BANNER;
[capacitor]         ^
[capacitor]         symbol:   class BannerAdSizeEnum
[capacitor]         location: class com.getcapacitor.community.admob.models.AdOptions.TesterAdOptionsBuilder
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\community\admob\models\AdOptions.java:197: error: cannot find symbol
[capacitor]         public TesterAdOptionsBuilder setAdSize(BannerAdSizeEnum value) {
[capacitor]         ^
[capacitor]         symbol:   class BannerAdSizeEnum
[capacitor]         location: class com.getcapacitor.community.admob.models.AdOptions.TesterAdOptionsBuilder
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:46: error: cannot find symbol
[capacitor]         InterstitialAdCallbackAndListeners.INSTANCE
[capacitor]         ^
[capacitor]         symbol:   variable InterstitialAdCallbackAndListeners
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:57: error: cannot find symbol
[capacitor]         new OnInitializationCompleteListener() {
[capacitor]         ^
[capacitor]         symbol:   class OnInitializationCompleteListener
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:55: error: cannot find symbol
[capacitor]         MobileAds.initialize(
[capacitor]         ^
[capacitor]         symbol:   variable MobileAds
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:72: error: package AuthorizationStatusEnum does not exist
[capacitor]         response.put("status", AuthorizationStatusEnum.AUTHORIZED.getStatus());
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:137: error: cannot find symbol
[capacitor]         TAG_FOR_CHILD_DIRECTED_TREATMENT = RequestConfiguration.TAG_FOR_CHILD_DIRECTED_TREATMENT_UNSPECIFIED;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:139: error: cannot find symbol
[capacitor]         TAG_FOR_CHILD_DIRECTED_TREATMENT = RequestConfiguration.TAG_FOR_CHILD_DIRECTED_TREATMENT_TRUE;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:141: error: cannot find symbol
[capacitor]         TAG_FOR_CHILD_DIRECTED_TREATMENT = RequestConfiguration.TAG_FOR_CHILD_DIRECTED_TREATMENT_FALSE;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:149: error: cannot find symbol
[capacitor]         TAG_FOR_UNDER_AGE_OF_CONSENT = RequestConfiguration.TAG_FOR_UNDER_AGE_OF_CONSENT_UNSPECIFIED;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:151: error: cannot find symbol
[capacitor]         TAG_FOR_UNDER_AGE_OF_CONSENT = RequestConfiguration.TAG_FOR_UNDER_AGE_OF_CONSENT_TRUE;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:153: error: cannot find symbol
[capacitor]         TAG_FOR_UNDER_AGE_OF_CONSENT = RequestConfiguration.TAG_FOR_UNDER_AGE_OF_CONSENT_FALSE;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:158: error: cannot find symbol
[capacitor]         String MAX_AD_CONTENT_RATING = RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:163: error: cannot find symbol
[capacitor]         MAX_AD_CONTENT_RATING = RequestConfiguration.MAX_AD_CONTENT_RATING_G;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:166: error: cannot find symbol
[capacitor]         MAX_AD_CONTENT_RATING = RequestConfiguration.MAX_AD_CONTENT_RATING_PG;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:169: error: cannot find symbol
[capacitor]         MAX_AD_CONTENT_RATING = RequestConfiguration.MAX_AD_CONTENT_RATING_T;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:172: error: cannot find symbol
[capacitor]         MAX_AD_CONTENT_RATING = RequestConfiguration.MAX_AD_CONTENT_RATING_MA;
[capacitor]         ^
[capacitor]         symbol:   variable RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:178: error: cannot find symbol
[capacitor]         RequestConfiguration requestConfiguration = new RequestConfiguration.Builder()
[capacitor]         ^
[capacitor]         symbol:   class RequestConfiguration
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:178: error: package RequestConfiguration does not exist
[capacitor]         RequestConfiguration requestConfiguration = new RequestConfiguration.Builder()
[capacitor]         ^
[capacitor]         C:\Users\user\Desktop\Projects\Modular\node_modules\@capacitor\android\capacitor\src\main\java\com\getcapacitor\AdMob.java:184: error: cannot find symbol
[capacitor]         MobileAds.setRequestConfiguration(requestConfiguration);
[capacitor]         ^
[capacitor]         symbol:   variable MobileAds
[capacitor]         location: class com.getcapacitor.community.admob.AdMob
[capacitor]
[capacitor]         > Task :capacitor-android:compileDebugJavaWithJavac FAILED
[capacitor]
[capacitor]         FAILURE: Build failed with an exception.
[capacitor]
[capacitor]         * What went wrong:
[capacitor]         Execution failed for task ':capacitor-android:compileDebugJavaWithJavac'.
[capacitor]         > java.lang.NullPointerException
[capacitor]
[capacitor]         * Try:
[capacitor]         Run with --stacktrace
[capacitor]         Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[capacitor]
[capacitor]         option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to
get full insights.
[capacitor]
[capacitor]         * Get more help at https://help.gradle.org
[capacitor]         You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[capacitor]
[capacitor]         See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
[capacitor]
[capacitor]         BUILD FAILED in 1m 33s
[capacitor]         86 actionable tasks: 9 executed, 77 up-to-date
[capacitor]
[ERROR] An error occurred while running subprocess capacitor.

        capacitor.cmd run android --target ce0817181b3ad4d60d7e exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Hi, I had a similar issue

  • have you done they npx copy sync?

also in android studio, sometimes I needed to run “file > sync grade files” and also run a “build > clean project”