flutter build apk –release
Font asset “MaterialIcons-Regular.otf” was tree-shaken, reducing it from 1645184 to 3616 bytes (99.8% reduction). Tree-shaking can be disabled by providing the –no-tree-shake-icons flag when building your app.
Target android_aot_release_android-arm64 failed: ProcessException: Failed to find “C:srcflutterbincacheartifactsengineandroid-arm64-releasewindows-x64gen_snapshot” in the search path.
Command: C:srcflutterbincacheartifactsengineandroid-arm64-releasewindows-x64gen_snapshot
Target android_aot_release_android-x64 failed: ProcessException: Failed to find “C:srcflutterbincacheartifactsengineandroid-x64-releasewindows-x64gen_snapshot” in the search path.
Command: C:srcflutterbincacheartifactsengineandroid-x64-releasewindows-x64gen_snapshot
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:compileFlutterBuildRelease’.
Process ‘command ‘C:srcflutterbinflutter.bat” finished with non-zero exit value 1
- Try:
Run with –stacktrace option to get the stack trace.
Run with –info or –debug option to get more log output.
Run with –scan to get full insights.
Get more help at https://help.gradle.org.
BUILD FAILED in 57s
Running Gradle task ‘assembleRelease’… 58.8s
Gradle task assembleRelease failed with exit code 1
I am unable to build the apk in latest flutter version
flutter –version
Flutter 3.24.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4cf269e36d (8 days ago) • 2024-09-03 14:30:00 -0700
Engine • revision a6bd3f1de1
Tools • Dart 3.5.2 • DevTools 2.37.2
1
try
flutter upgrade
it works for me