1

My app is running very well in debug mode. Now I am trying to build an appbundle for release, but have error.

Oops; flutter has exited unexpectedly: "Invalid argument(s): Cannot find executable for /Users//Developer/flutter/bin/cache/artifacts/engine/android-arm64-release/darwin-x64/gen_snapshot.". A crash report has been written to /Users//AndroidStudioProjects/*********/flutter_04.log. This crash may already be reported. Check GitHub for similar crashes.
https://github.com/flutter/flutter/issues?q=is%3Aissue+Invalid+argument%28s%29%3A+Cannot+find+executable+for+%2FUsers%2F*****%2FDeveloper%2Fflutter%2Fbin%2Fcache%2Fartifacts%2Fengine%2Fandroid-arm64-release%2Fdarwin-x64%2Fgen_snapshot.

To report your crash to the Flutter team, first read the guide to filing a bug. https://flutter.dev/docs/resources/bug-reports

Create a new GitHub issue by pasting this link into your browser and completing the issue template. Thank you! https://git.io/JO1nF

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/****/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildRelease'.

Process 'command '/Users/*****/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 58s
Running Gradle task 'bundleRelease'...
Running Gradle task 'bundleRelease'... Done 58.8s Gradle task bundleRelease failed with exit code 1

I don't nkow what to do. Thanks for those who can suggest me something.

2
  • Have you used 'Internet Permission' in android? Commented Apr 23, 2021 at 13:00
  • Yes I used it. With my research on internet, I think the problem is gen_snapshot, I am looking how to solve that. Thank you for your comment. Commented Apr 24, 2021 at 0:58

1 Answer 1

2

I was able to build appbundle by running in the terminal

flutter upgrade -f
flutter channel master
flutter upgrade

But I am facing another problem: when I run in release mode, it stuck at this Installing build/app/outputs/flutter-apk/app.apk...

Sign up to request clarification or add additional context in comments.

2 Comments

try to connect and use a real device not a simulator to install and run your release apk.@Vincent
The problem is solve. The problem was caused by the interstitial ads. I just delete all interstitial ads and it work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.