Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I am trying to make an apk its generated but with this error Execution failed for task ':app:bundleReleaseJsAndAssets'

Task :app:bundleReleaseJsAndAssets Scanning folders for symlinks in C:\react-native\first_app\node_modules (109ms) Scanning folders for symlinks in C:\react-native\first_app\node_modules (47ms) warning: the transform cache was reset. Loading dependency graph, done.

Unable to resolve module AccessibilityInfo from C:\react-native\first_app\node_modules\react-native\Libraries\react-native\react-native-implementation.js: Module AccessibilityInfo does not exist in the Haste module map

This might be related to https://github.com/facebook/react-native/issues/4968 To resolve try the following: 1. Clear watchman watches: watchman watch-del-all. 2. Delete the node_modules folder: rm -rf node_modules && npm install. 3. Reset Metro Bundler cache: rm -rf /tmp/metro-bundler-cache-* or npm start -- --reset-cache. 4. Remove haste cache: rm -rf /tmp/haste-map-react-native-packager-*.

FAILURE: Build failed with an exception.

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

    Process 'command 'cmd'' 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 42s 12 actionable tasks: 1 executed, 11 up-to-date

like image 754
dipanshu kumar Avatar asked Oct 21 '25 15:10

dipanshu kumar


1 Answers

As mentioned here, It may be because of you did not bundled correctly for android.

You can add following script "bundle-android": "node node_modules/react-native/local-cli/cli.js bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/"

into scripts of your package.json

and the run npm run bundle-android

after that try running gradlew assembleRelease -x bundleReleaseJsAndAssets in android directory of your project. Hope it will solve your problem.

like image 184
kamran Avatar answered Oct 23 '25 05:10

kamran