I’m trying to generate an android build with:

ionic cordova build android --prod

and I’m getting this error:

I’ve already updated gradle for 7.2 version
I’m using angular

What did the console say after running with --verbose flag?

1 Like

Says the same thing :confused:

what is your android platform installed?
what is cordova version?
what is your minsdk and taregetsdk in config.xml?

there is something wrong with your platform version and gradle, for example if you using android pltform 10+ your gradle should be 7.1.1

so please show what android platform on package.json

  "cordova-android": "^10.1.1",

please show what targetSdkVersion and minSdkVersion in config.xml

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

The error says google-services.json is missing. It means you may registered your app in firebase console, added cordova fcm plugin and forgot to add google-services.json file in platforms/android/app folder. Did your forgot to download google-services.json file after registering your app in firebase console??

Here is what I did to solve my problem: flutter - Message "error: resource android:attr/lStar not found" - Stack Overflow