Android release build crashing after changing app_name (strings.xml).
App is building and running successfully in DEBUG variant but failing with the below error in release varian both through CLI (react-native run-android --variant release --deviceId XYZZ
) and through android-studio.
screenshot of logcat logs
Steps taken to resolve:
Please note the DEBUG build is successfully running.
"react": "16.8.3", "react-native": "0.59.4", gradle-5.4.1, buildToolsVersion = "28.0.3, compileSdkVersion = 28, targetSdkVersion = 28, supportLibVersion = "28.0.0", googlePlayServicesVersion = "11.8.0""
EDIT: AppName in package.json and app.json and getMainComponentName() in MainActivity class all refer to the same name and AppRegistry is using the appName from app.json(project created using react-native init).
Found the issue to be not related to change in appName rather app unable to start because of issue in store.js implementation.
const middlewares = [thunk, __DEV__ ? logger : null];
Trying to apply a null middleware is the issue for app crashing on boot. But thanks to the friendly vague message Application is not registered
which ruined most of the time.