-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
react.gradle file not bundling Js code #9612
Comments
my question is the same with you~
But I can't go to manually each time when run the project execution |
I'm hitting this in React Native 0.34 on Android as well, but only from within Android Studio. If I run On the other hand, building/installing from within Android Studio skips the |
I have the same issue. NO matter what I do, I cannot find the generated bundle file in either debug or release apk despite having uncommented project.ext.react in the app module. |
I was able to get this working in Android Studio by going to Preferences > Build, Execution, Deployment > Build Tools > Compiler and unchecking "Configure on demand". It was always working for me when running |
Weird. I am running on Mac OS X El Captain.
To me this whole thing is a royal nightmare. And total lack of documentation on this topic is completely ridiculous. To make things more interesting, I do not have gradlew in the android project directory at all. No wonder running ./gradlew does not work. However, having added the gradle binary to PATH MacBook-Pro:android$ which gradle and running gradle assembleRelease works fine. This is completely undocumented. Is it really so hard to compile proper instructions for Mac starting with node installation (which Studio does not seem to pick up at all)? I am still unable to do this from the IDE although the proper task is getting picked up thanks to @corbt . Task is failing because it is not finding the right node installation...I can't figure out how to resolve this... Update: The reason why node execution is failing is because the path of all visual apps on Mac OS is fixed. The apps do not execute any of the user shell profiles when they are started so if there is some nvm or node setup being done in files such as .bash_profile, they will not get picked app by Studio which will barf at executive react-native shell commands which are node based... |
I had similar issues (and again running the gradlew assembleRelease thing seems to work fine but then ended up signing and zip align-ing manually which was extremely tedious). @waqas19921 One thing worth trying is running the I highly recommend setting up new RN projects following closely the guide around certificates etc... unfortunately I set this one up 6 months ago and it appears that unwinding the more 'standard' Android approach (using AS + keyfile) will now be a lot of hassle. |
@corbt your suggestion worked for me too. Thanks for the help. |
Hi, I would like to summarize the solution to bundle everything within a debug build. Especially the hint in point two did the trick for me. Found that in an underrated comment on stackoverflow. 1. Android Studio
2. build.gradle
3. Create APK
|
So I think I figured it all out, I definitely now have builds reliably running properly when hitting the "Run" button. There are two issues (on OSX):
To Solve:1) Bundling being skippedUncheck "Configure on demand" as discussed above
2) Android Studio not finding nodeEven after fixing bundling being skipped, the build still fails with
There are workarounds for trying to get OSX apps to use your PATH, but basically - they're all terrible, relatively difficult, require restarts, and generally break between OSX versions, and for other reasons. So the solution - when
What we want to do is tell Instead, you set it in the
Now open Open
The |
@Oblongmana @norman-kapschefsky I love you both. |
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
It continues and broke builds on Android Studio 3.0 Preview Canary 9 with gradle plugin 3.0.0 alpha9. |
I also meet this problem: A problem occurred starting process 'command 'node''. |
Hi, I ran into this problem getting our Android app published, and ended up writing a medium article that addresses this and related issues. |
We ended up using a custom bash script that should be run only the first time someone clones our app repository. It creates a node wrapper specific to our developer's workstation to be used by React Native as well as CodePush build scripts by simply residing in the app's root folder. Below is the script. Copy it in a file named
from the terminal only once. Script:
|
i uncommented app.gradle code to following
but no js is bundled in apk file upon building in both debug and release mode and no js files are placed in assets folder.
and following exception is thrown
i am using react-native version
0.32.0
on windows 10 and for android
The text was updated successfully, but these errors were encountered: