Task :app:bundleReleaseJsAndAssets FAILED

See original GitHub issue

I’m following this to get my signed APK

Description

Executing ./gradlew bundleRelease or ./gradlew assembleRelease however gives an error. > Task :app:bundleReleaseJsAndAssets warning: the transform cache was reset. Loading dependency graph, done. info Writing bundle output to:, A:\Documents\React info Writing sourcemap output to:, A:\Documents\React info Done writing bundle output info Done writing sourcemap output info Copying 33 asset files error EEXIST: file already exists, mkdir 'A:\Documents\React'. Run CLI with --verbose flag for more details. Error: EEXIST: file already exists, mkdir 'A:\Documents\React'

> Task :app:bundleReleaseJsAndAssets FAILED FAILURE: Build failed with an exception. Execution failed for task ':app:bundleReleaseJsAndAssets'

React Native version:

Binaries: Node: 13.10.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.13.7 - C:\Program Files\nodejs\npm.CMD SDKs: Android SDK: API Levels: 23, 25, 28, 29 Build Tools: 25.0.2, 28.0.3, 29.0.2, 29.0.3, 30.0.0 System Images: android-18 | Google APIs ARM EABI v7a, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom IDEs: Android Studio: Version 3.6.0.0 AI-192.7142.36.36.6241897 npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.5 => 0.61.5

Expected Results

Getting a signed apk file. ./gradlew assembleDebug works with no issues

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:21

github_iconTop GitHub Comments

30reactions
jitu94517commented, Jun 6, 2020

I fixed it using these steps;

  1. 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
  2. cd android
  3. gradlew clean
  4. gradlew assembleRelease -x bundleReleaseJsAndAssets

Source: Stackoverflow

by using this, apk was created but crashed when open

24reactions
usersinacommented, Apr 16, 2020

I fixed it using these steps;

  1. 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

  2. cd android

  3. gradlew clean

  4. gradlew assembleRelease -x bundleReleaseJsAndAssets

Source: Stackoverflow

Read more comments on GitHub >

github_iconTop Results From Across the Web

React-Native assembleRelease fails for task - Stack Overflow
For me the creating the bundle failed, but I noticed this comment by Sahin ... gradlew clean app:assembleRelease -x bundleReleaseJsAndAssets.
Read more >
Execution failed for task ':app:bundleReleaseJsAndAssets'.
Hello, i have a problem with EAS Build. I'm running the command: “eas build --platform android”. Linux-x64. EXPO SDK: 45. EAS-CLI: 2.1.0
Read more >
task :app:bundlereleasejsandassets failed - OSCHINA
TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.
Read more >
Task :app:bundleReleaseJsAndAssets FAILED - Code Grepper
task :app:bundlereleasejsandassets failed. Add Answer | View In TPC Matrix. Technical Problem Cluster First Answered On June 19, 2021 Popularity 9/10 ...
Read more >
Build error during Apk generation for Android
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:bundleReleaseJsAndAssets'.
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