question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Debug Build Will Run, Release Build Will Not

See original GitHub issue

RN 0.34.1

Debug version of the android application runs perfectly fine:

react-native run-android

Production build will build successfully, but will not run (“Unfortunately, appName has stopped” modal):

react-native run-android --variant=release

I have made sure that ProGuard is turned off. Here are the errors reported by logcat:

10-05 14:13:46.102  5163  5179 E ReactNativeJS: Invalid regular expression: unmatched parentheses
10-05 14:13:46.242  5163  5179 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling runApplication)
10-05 14:13:46.774  5163  5179 E ReactNativeJS: Module AppRegistry is not a registered callable module (calling unmountApplicationComponentAtRootTag)

The odd thing, is that I have searched for regular expressions in my codebase and haven’t found any. I do not get these errors in logcat when running the debug version of the app. So I’m not sure why or where the production build is getting tripped up.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
akraminakibcommented, Oct 10, 2016

I get the same issue, debug build works normally after build but the release build closes on opening it with the same error message (“Unfortunately, app_name has stopped.”)

1reaction
rajeshzmokecommented, Jan 3, 2018

hi i have the same issue where the release build stops working when the app is opened

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio : build on debug but not on release
So, now I have 2 questions : - First, why the apk build failed in release variant and not in debug variant. The...
Read more >
Build your app for release to users
If the build variant you've selected is a debug build type, then the APK is signed with a debug key and it's ready...
Read more >
Android — Keeping Release and Debug Installed All the ...
You should always have the production build of your app installed and not uninstall it to run debug. This helps you to catch...
Read more >
Debug build runs fine, but release builds throw exception
And if code shrinker to 'R8', please enable the ProGuard. Next, you can either let the Xamarin.Android build process use a default ProGuard ......
Read more >
'debug' build type has default signing key, others do not ...
apk) is not signed. Please specify a signing configuration for this variant (profile). This doesn't make sense to me, since I've in the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found