My app crashes as soon as it opens. Why?

Also searched as: App crashes on startup · App crashes on startup Android · App crashes on startup iPhone · Flutter app crashes on startup Android · TestFlight app crashes on startup

Updated 3 October 2026

Short answer

Get the crash report first: it names the line that failed. When a mobile app crashes on launch, and especially when it only crashes in the release or TestFlight version, the release build is usually missing something the developer's test version had: a setting or API key, code the release build stripped out to save space, or a backend that answered during testing and doesn't now.

What's the problem

The app opens for a split second and closes. Or it worked in testing and crashes for everyone who downloads it. Store reviewers reject it, and users leave one-star reviews.

Why it happens

A crash is the app hitting an error nothing in the code caught. Launch is when the app reads its settings, connects to its services and loads the user's data, so anything missing shows up immediately.

  • The release build is different. Developers test a debug version. The store gets a release version, built with different settings and optimisations.
  • Optimisation removed code the app needed. Android's release builds strip out code that looks unused, to make the app smaller. Code that's only reached indirectly can be removed by mistake, and the app crashes when it reaches for it.
  • A key or config file is missing. Service config (for Firebase, maps, payments) or keys that were on the developer's machine never made it into the release build.
  • The backend isn't there. The app asks its server for data at launch, gets nothing or something unexpected, and doesn't handle it.
  • The phone is different. A newer or older operating system version, or a permission the app assumes it has.

How to fix it

  1. Get the crash report. Google Play Console (Android vitals) and App Store Connect (TestFlight crash feedback) show crashes from real devices. Crash reporting tools such as Crashlytics show them with the line of code.
  2. Install the release build yourself, the exact one users get, on a real device, and reproduce the crash.
  3. Android: if the crash mentions a missing class or method, add keep rules for that code so the optimiser leaves it in.
  4. Check every key and config file is included in the release build and points at production services.
  5. Check the backend the app calls at launch is live and returns what the app expects. Make the app show an error instead of crashing when it doesn't.

When to call Preventionlabs

If the crash report points at one missing file or rule, fix it and resubmit. Call us when the app can't be built any more, the crash is in code nobody understands, or the backend it depends on is down or gone. A resurrection gets the app and its backend running, with the backend deployed in your own hosting account, protected to MVP level, and on infrastructure that scales.

Submit your project for a free assessment

Free assessment. $10,000 AUD flat to get it live, only if we take it on and you go ahead.

Sources

  1. Android Developers: Crashesofficial docsAn Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal.
  2. Android Developers: Enable app optimization with R8official docsWhile it reduces app size and improves performance, it might require additional keep rules to prevent necessary code from being stripped.
  3. Apple: App Review Guidelinesapp store rulesWe will reject incomplete app bundles and binaries that crash or exhibit obvious technical problems.
  4. Apple: App Review Guidelinesapp store rulesMake sure your app has been tested on-device for bugs and stability before you submit it, and include demo account info (and turn on your back-end service!) if your app includes a login.
← All of Live but broken