I have recently converted my only cordova project to use Ionic and Capacitor. Publishing to the app store I find my app is too big (in the aab format), because I have too many images. I understand I need to create an asset pack. All I can find about the details of a creating an asset pack is https://developer.android.com/guide/playcore/asset-delivery/integrate-native (anyone have any better information?).
After following those steps, in VS Code I ...
> ionic build
> ionic capacitor build
Then in Android studio I do.
Menu | Build | Make Project
I get the following error:
Build file 'C:\code\myco-match\android\build.gradle' line: 27
A problem occurred evaluating root project 'android'.
> Could not find method android() for arguments [build_19eh0vogqj489iczcfbatfj08$_run_closure2@69641835] on root project 'android' of type org.gradle.api.Project.
Line 27 is
android {
assetPacks = [":species-images"]
}
Did I leave out a step in the build?
Am I missing something in my gradle configuration? I am not that familiar with gradle).
Did I forget something in my initial app conversion? It was my 1st cordova project converted to my 1st ionic and capacitor project.
Any ideas?