0

I am getting these errors

Task :app:bundleReleaseJsAndAssets warning: the transform cache was reset. Loading dependency graph, done. info Writing bundle output to:, C:\KLS info Writing sourcemap output to:, C:\KLS error EPERM: operation not permitted, open 'C:\KLS'. Run CLI with --verbose flag for more details. Error: EPERM: operation not permitted, open 'C:\KLS'

Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

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

    Process 'command 'npx.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 4m 9s 42 actionable tasks: 2 executed, 40 up-to-date

jithin mp
  • 95
  • 2
  • 10

1 Answers1

0
react-native 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/

Run this command into the terminal into your project Dir. It will create the assets and adding the drawable files into the assets dir and then

clean Project & Rebuild

Now try to make the release build from android studio. May be you will get the duplicate resource error. In that case,

remove the drawables folder && raw folder in res dir

Hope it will work.

Neha Chauhan
  • 622
  • 4
  • 12