task 'bundleReleaseJsAndAssets' is not run when run assembleRelease

See original GitHub issue

e458c601405

As the above images. I run assembleRelease on two pc. And on a pc, I find that bundleReleaseJsAndAssets is not run, and run the release apk file, occur running error as follows:

E/AndroidRuntime(11821): com.facebook.react.bridge.JSExecutionException: ReferenceError: Can't find variable: __fbBatchedBridge (line 1 in the generated bundle)
E/AndroidRuntime(11821):    at com.facebook.react.bridge.ReactBridge.loadScriptFromAssets(Native Method)
E/AndroidRuntime(11821):    at com.facebook.react.bridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:32)
E/AndroidRuntime(11821):    at com.facebook.react.bridge.CatalystInstanceImpl$2.run(CatalystInstanceImpl.java:154)
E/AndroidRuntime(11821):    at android.os.Handler.handleCallback(Handler.java:733)
E/AndroidRuntime(11821):    at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(11821):    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
E/AndroidRuntime(11821):    at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(11821):    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$1.run(MessageQueueThreadImpl.java:137)
E/AndroidRuntime(11821):    at java.lang.Thread.run(Thread.java:841)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
soxunyicommented, Apr 14, 2016

Before cd android && ./gradlew assembleRelease, Run the below bundle command, instead ofbundleReleaseJsAndAssets `react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/

2reactions
dantmancommented, Feb 21, 2016

bundleReleaseJsAndAssets is run for me when I use ./gradlew assembleRelease instead of using the standard way of running gradle through Android Studio.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Task 'bundleReleaseJsAndAssets' not found in root project
So possibly try running this instead: ./gradlew assembleRelease -x bundleDevReleaseJsAndAssets. Basically as-is you were telling it to ...
Read more >
task 'bundleReleaseJsAndAssets' is not run ... - React Native
task 'bundleReleaseJsAndAssets' is not run when run assembleRelease. mkonicek. Moved from https://github.com/facebook/react-native/issues/5615.
Read more >
task :app:mergereleaseresources failed
gradlew assemblerelease -x bundlereleasejsandassets. Generate signed release android APK run without server React Native. This tutorial explains how to ...
Read more >
bundleReleaseJsAndAssets fails with error "bundle.getAssets ...
Doing a fresh Git clone and running ./gradlew assembleRelease from the android folder works fine on my local machine. The only difference I...
Read more >
task :app:bundlereleasejsandassets failed - OSCHINA
DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) at ... gradlew assembleRelease卡在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