react.gradle doesn't create index.android.bundle - Android
See original GitHub issueI created a sample project using ‘react-native init project’ on Mac OS.
When I run ./gradlew assembleRelease no index.android.bundle file gets created. Plus no react related tasks appear in Android Studio.
It seems like the command:
commandLine "node", "node_modules/react-native/local-cli/cli.js", "bundle", "--platform", "android", "--dev", "${devEnabled}", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
doesn’t run.
When I run the same command manually everything works smoothly.
Not sure how relevant this is but the command :```
doFirst {
jsBundleDir.mkdirs()
resourcesDir.mkdirs()
}
Also doesn’t work, unless I take both commands outside the “doFirst”.
Any suggestions ?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:26 (7 by maintainers)
Top Results From Across the Web
index.android.bundle not updating when creating release build
I'm working on a Project in ReactNative ...
Read more >Solved: Unable to load script from assets 'index.android.bundle'
bundle ' Lets fix this error, once and for all! ii) If the folder assets doesn't exist then create the assets directory there....
Read more >Addressing common errors in React Native - LogRocket Blog
Solution 1: Package the bundle correctly ... All of your app's JavaScript is bundled into the index.android.bundle file. If the bundle file is ......
Read more >Known issues with Android Studio and Android Gradle Plugin
When you navigate to Build > Generate Signed Bundle / APK and attempt to configure app signing ... Android Studio doesn't start after...
Read more >Bundling React Native during Android release builds
gradle file. react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You said exactly right. In Android Studio, go to
File | Settings | Build, Execution, Deployment | Compiler
, the optionConfigure on demand
is checked by default for speeding up builds, uncheck it then everything is ok now.I face the same problem , and I did not add
org.gradle.configureondemand=true
in my gradle.properties,assembleRelease
does not runbundleReleaseJsAndAssets
task.