question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react.gradle doesn't create index.android.bundle - Android

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:26 (7 by maintainers)

github_iconTop GitHub Comments

22reactions
AvatarQingcommented, May 20, 2016

You said exactly right. In Android Studio, go to File | Settings | Build, Execution, Deployment | Compiler, the option Configure on demand is checked by default for speeding up builds, uncheck it then everything is ok now.

16reactions
AvatarQingcommented, May 19, 2016

I face the same problem , and I did not add org.gradle.configureondemand=true in my gradle.properties, assembleRelease does not run bundleReleaseJsAndAssets task.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

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