I am able to build an unsigned APK using flutter build apk --split-per-abi --no-tree-shake-icons
. However, when I attempt to generate a signed APK, I get several Kotlin related errors. To be clear, I can build the project without signing just fine. However, when I attempt to generate a signing key (via Android Studio) the process fails with the errors shown below. I believe the signing process uses 'tools.jar' which is available in JDK 8. I have added JDK 8 (liberica-1.8) to the project structure. I've seen some postings indicating openjdk@8 is not compatible with M1 Macs. The JDK 8 included with Android Studio, however, indicates that it supports aarch64 so I assume this isn't a problem. Nevertheless, I cannot determine the source of these errors.
MainActivity.kt:
I'm using the APK key generation process in Android Studio to sign my APK (Build > Generate Signed Bundle / APK):
I am not attempting to run ProGuard at this time:
I am running on Apple silicon. I've tried flutter clean
and invalidating caches.