Native application closes as soon as it is launched

Hello experts,   I am working on a pluggable widget. After adding the widget to my native application and running it on the “Make it Native 9” application, it is working fine however, when I generate a .apk file from the Build Native Mobile App, the application gets installed BUT  as soon as I launch the application, it closes immediately. I get a pop-up error saying “the app keeps stopping”. As per this forum question:   I opened the application on android studio and ran it on the emulator. Below is the logcat  logs 2022-08-30 15:37:18.332 9810-9849/com.mendix.nativetemplate E/ReactNativeJS: Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native. 2022-08-30 15:37:18.415 9810-9850/com.mendix.nativetemplate E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules Process: com.mendix.nativetemplate, PID: 9810 com.facebook.react.common.JavascriptException: Error: [@RNC/AsyncStorage]: NativeModule: AsyncStorage is null. To fix this issue try these steps: • Run `react-native link @react-native-community/async-storage` in the project root. • Rebuild and restart the app. • Run the packager with `--reset-cache` flag. • If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. • If this happens while testing with Jest, check out docs how to integrate AsyncStorage with it: If none of these fix the issue, please open an issue on the Github repository: , stack: <unknown>@419:180 h@2:1585 <unknown>@418:217 h@2:1585 <unknown>@417:324 h@2:1585 <unknown>@7:1118 h@2:1585 <unknown>@6:35 h@2:1585 d@2:958 global code@1047:3 at com.facebook.react.modules.core.ExceptionsManagerModule.reportException( at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke( at com.facebook.react.bridge.JavaModuleWrapper.invoke( at Method) at android.os.Handler.handleCallback( at android.os.Handler.dispatchMessage( at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage( at android.os.Looper.loop( at com.facebook.react.bridge.queue.MessageQueueThreadImpl$ at   Also When I  run the command provided in the logs related to  async storage I get the following error: D:\apps\V 2\fem-master\fem-master>react-native link @react-native-community/async-storage warn Package @react-native-community/async-storage has been ignored because it contains invalid configuration. Reason: Cannot find module '@react-native-community\async-storage\package.json' Require stack: - D:\apps\V 2\fem-master\fem-master\node_modules\react-native\node_modules\@react-native-community\cli\build\tools\config\resolveNodeModuleDir.js - D:\apps\V 2\fem-master\fem-master\node_modules\react-native\node_modules\@react-native-community\cli\build\tools\releaseChecker\index.js - D:\apps\V 2\fem-master\fem-master\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\start\runServer.js - D:\apps\V 2\fem-master\fem-master\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\start\start.js - D:\apps\V 2\fem-master\fem-master\node_modules\react-native\node_modules\@react-native-community\cli\build\commands\index.js - D:\apps\V 2\fem-master\fem-master\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js - D:\apps\V 2\fem-master\fem-master\node_modules\react-native\cli.js  
0 answers