I am new at flutter. I am currently using FlutterFlow to develop and for custom coding I am using Flutter on VS code.
I think I am doing something wrong while installing flutter (check flutter doctor) that's why I am getting this error.
Please let me know what is going wrong.
FYI - App runs on emulator and I am able to do USB debug but not able to make APK.
Terminal -
parthsheth@Parths-MacBook-Air fineappl-pat % flutter build apk
Building with sound null safety
Target android_aot_release_android-arm failed: ProcessException: Bad CPU type in executable
Command: /Users/parthsheth/Developer/flutter/bin/cache/artifacts/engine/android-arm-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=/Users/parthsheth/Developer/New pat/fineappl-pat/.dart_tool/flutter_build/17315c88eac0b66d5360d145b85fb5b9/armeabi-v7a/app.so --strip --no-sim-use-hardfp --no-use-integer-division /Users/parthsheth/Developer/New pat/fineappl-pat/.dart_tool/flutter_build/17315c88eac0b66d5360d145b85fb5b9/app.dill
Target android_aot_release_android-arm64 failed: ProcessException: Bad CPU type in executable
Command: /Users/parthsheth/Developer/flutter/bin/cache/artifacts/engine/android-arm64-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=/Users/parthsheth/Developer/New pat/fineappl-pat/.dart_tool/flutter_build/17315c88eac0b66d5360d145b85fb5b9/arm64-v8a/app.so --strip /Users/parthsheth/Developer/New pat/fineappl-pat/.dart_tool/flutter_build/17315c88eac0b66d5360d145b85fb5b9/app.dill
Target android_aot_release_android-x64 failed: ProcessException: Bad CPU type in executable
Command: /Users/parthsheth/Developer/flutter/bin/cache/artifacts/engine/android-x64-release/darwin-x64/gen_snapshot --deterministic --snapshot_kind=app-aot-elf --elf=/Users/parthsheth/Developer/New pat/fineappl-pat/.dart_tool/flutter_build/17315c88eac0b66d5360d145b85fb5b9/x86_64/app.so --strip /Users/parthsheth/Developer/New pat/fineappl-pat/.dart_tool/flutter_build/17315c88eac0b66d5360d145b85fb5b9/app.dill
FAILURE: Build failed with an exception.
* Where:
Script '/Users/parthsheth/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1165
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Users/parthsheth/Developer/flutter/bin/flutter'' 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 8s
Running Gradle task 'assembleRelease'... 9.7s
Gradle task assembleRelease failed with exit code 1
I don't know if this a system error or code error.
Let me know what other information y'all to address the problem.
Flutter Doctor -
parthsheth@Parths-MacBook-Air ~ % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel master, 3.5.0-12.0.pre.130, on macOS 13.0 22A380
darwin-arm64, locale en-IN)
✗ Downloaded executables cannot execute on host.
See https://github.com/flutter/flutter/issues/6207 for more information
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.71.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
! Doctor found issues in 1 category.